Skip to content

Conversation

@jasonpaulos
Copy link
Contributor

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

@jasonpaulos jasonpaulos requested a review from algochoi December 17, 2021 21:38
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

3 participants