Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Change http status code for transaction_exception and eof_exception #4891

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

andriantolie
Copy link
Contributor

Change http status code for transaction_exception and eof_exception so its error message is not swallowed by cleos. Currently they are treated as 400, which by cleos will be displayed as:

Error 3200006: invalid http request
Error Details:
The server has rejected the request as invalid!
Please verify this url is valid: http://127.0.0.1:8888/v1/chain/push_transaction
If the condition persists, please contact the RPC server administrator for 127.0.0.1!

and is confusing for the developer when they are trying to investigate the problem.

…o its error message is not swallowed by cleos
@jgiszczak jgiszczak merged commit 1f96eb6 into develop Jul 27, 2018
@jgiszczak jgiszczak deleted the http branch July 27, 2018 21:00
@yqzzj
Copy link

yqzzj commented Jul 31, 2018

@andriantolie I seem to met this problem.

zzj@ubuntu:~/.local/share/eosio/nodeos/config$ cleos get transaction f04c38f5692143e360ecb28d1be41ec62a5bb4a405e5dfb6731317c79a975f64
Error 3200006: invalid http request
Error Details:
The server has rejected the request as invalid!
Please verify this url is valid: http://127.0.0.1:8888/v1/history/get_transaction
If the condition persists, please contact the RPC server administrator for 127.0.0.1!

I config http_plugin , http-validate-host and so on.

It should return "tx not found",right?
It really puzzled me for a long time.

@andriantolie
Copy link
Contributor Author

andriantolie commented Jul 31, 2018

Even after the PR is merged?
Yep it should return "tx not found"

@yqzzj
Copy link

yqzzj commented Jul 31, 2018

I haven't merged yet.
My code is still 1.1.1.
I think it will be ok after merged.
Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants