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

Commit

Permalink
Merge pull request #4891 from EOSIO/http
Browse files Browse the repository at this point in the history
Change http status code for transaction_exception and eof_exception
  • Loading branch information
jgiszczak authored Jul 27, 2018
2 parents f681356 + ceb02ef commit 1f96eb6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugins/http_plugin/http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,9 @@ namespace eosio {
} catch (chain::tx_duplicate& e) {
error_results results{409, "Conflict", error_results::error_info(e, verbose_http_errors)};
cb( 409, fc::json::to_string( results ));
} catch (chain::transaction_exception& e) {
error_results results{400, "Bad Request", error_results::error_info(e, verbose_http_errors)};
cb( 400, fc::json::to_string( results ));
} catch (fc::eof_exception& e) {
error_results results{400, "Bad Request", error_results::error_info(e, verbose_http_errors)};
cb( 400, fc::json::to_string( results ));
error_results results{422, "Unprocessable Entity", error_results::error_info(e, verbose_http_errors)};
cb( 422, fc::json::to_string( results ));
elog( "Unable to parse arguments to ${api}.${call}", ("api", api_name)( "call", call_name ));
dlog("Bad arguments: ${args}", ("args", body));
} catch (fc::exception& e) {
Expand Down

0 comments on commit 1f96eb6

Please sign in to comment.