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

404 response message gets wrapped to 'Incorrect statusCode: ${res.statusCode}' #106

Open
dermo666 opened this issue May 19, 2020 · 1 comment

Comments

@dermo666
Copy link
Contributor

dermo666 commented May 19, 2020

When I receive 404 response the message gets overwritten to
Incorrect statusCode: ${res.statusCode}

instead of passing the original message.

Could you pass the original message? Why the Incorrect statusCode: wrapping?

It could be fixed by
this.message = res.statusMessage

@dermo666 dermo666 changed the title 404 response message get wrapped to 'Incorrect statusCode: ${res.statusCode}' 404 response message gets wrapped to 'Incorrect statusCode: ${res.statusCode}' May 19, 2020
@mikeal
Copy link
Owner

mikeal commented May 27, 2020

would take a PR for this.message += res.statusMessage

dermo666 pushed a commit to dermo666/bent that referenced this issue May 28, 2020
* set name property to StatusError - mikeal#105
* pass on the actual statusMessage from the response instead of 'Incorrect statusCode ...' - mikeal#106
mikeal pushed a commit that referenced this issue Jun 26, 2020
* set name property to StatusError - #105
* pass on the actual statusMessage from the response instead of 'Incorrect statusCode ...' - #106

Co-authored-by: Tomas Dermisek <tomas.dermisek@optus.com.au>
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

No branches or pull requests

2 participants