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

Bug #218, respond with 4xx HTTP error codes, not 500 #220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nfreear
Copy link

@nfreear nfreear commented Jul 23, 2018

Hi @eduardoboucas,

I've implemented a fix/enhancement for the #218 issue.

You'll see that it uses several sources to try to determine the HTTP status code — payload.rawError.code, then payload.rawError._smErrorCode.

The possible HTTP status codes are:

I hope this helps.

Best wishes,

Nick

@nfreear
Copy link
Author

nfreear commented Jul 23, 2018

Hi @eduardoboucas,

The Travis-CI build fails because of a pre-existing standard style error.

If you ignore that, the unit tests etc. pass fine!

I hope that helps,

Nick


(Travis-CI: .. 407144707)

@eduardoboucas
Copy link
Owner

I must say I'm not sure I like the idea of using 404 for missing config properties. As you pointed out, I think a 400 would be more appropriate.

Other than that, it looks great. Thanks for this!

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.

None yet

2 participants