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

Status codes are not being picked up from error message #108

Closed
demetriusnunes opened this issue Sep 29, 2016 · 6 comments · Fixed by #133
Closed

Status codes are not being picked up from error message #108

demetriusnunes opened this issue Sep 29, 2016 · 6 comments · Fixed by #133

Comments

@demetriusnunes
Copy link
Contributor

serverless now promotes a convention that if you throw a error with a message like "[404] Not Found", it will set the status code appropriately.

Offline is not picking up on this convention.

@Bilal-S
Copy link
Contributor

Bilal-S commented Sep 29, 2016

OK. will need to review. I think this could be implemented by changing the offline response template.
Can you link to docs that describe this behavior in serverless itself?

@dherault
Copy link
Owner

Wow this is great, which serverless version?

@demetriusnunes
Copy link
Contributor Author

The docs for it are here: https://serverless.com/framework/docs/providers/aws/events/apigateway/ under "Using status codes"

@dherault
Copy link
Owner

dherault commented Nov 1, 2016

Fixed in v3.2!

@dherault dherault closed this as completed Nov 1, 2016
@demetriusnunes
Copy link
Contributor Author

Sorry @dherault, but I've just installed 3.2.1 and it's not fixed, at least when using traditional lambda integration (not lambda-proxy). I don't see any code in 3.2.1 that would do that. Forgot to merge?

@dherault
Copy link
Owner

dherault commented Nov 2, 2016

I thought I'd be the case sorry! Reopening u_u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants