Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HTTP error messages #485

Merged
merged 2 commits into from
Dec 17, 2021
Merged

Improve HTTP error messages #485

merged 2 commits into from
Dec 17, 2021

Conversation

jasonpaulos
Copy link
Member

Improve the HTTP error messages that superagent returns.

Before this PR, an error would look like:

Error: Bad Request

After this PR, it contains the error message returned from the server, like this:

Error: Network request unsuccessful. Received status 400: TransactionPool.Remember: transaction QJALLV5B3QDLCOOMOBGBEORNUGBRNNG6DVQ2DN42XATI4P2WFSAA: logic eval error: + overflowed. Details: pc=316, opcodes=load 4
       btoi
       +

Closes #462

Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@jasonpaulos jasonpaulos merged commit 84b50ba into develop Dec 17, 2021
@jasonpaulos jasonpaulos deleted the improve-http-errors branch December 17, 2021 22:08
aldur pushed a commit that referenced this pull request Jan 20, 2022
* Improve superagent errors

* Update expected error response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message for network requests
2 participants