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

fix: Lambda timeout status code #1620

Merged

Conversation

DorianMazur
Copy link
Collaborator

@DorianMazur DorianMazur commented Dec 1, 2022

Description

serverless-offline returns wrong status code when timeout occurs. Instead of 502, it should return 504.
This pull request fixes this issue.

Motivation and Context

According to serverless docs, it should be 504.
image
image
https://github.com/serverless/serverless/blob/main/test/integration/aws/api-gateway.test.js#L226

How Has This Been Tested?

At the moment I have tested against our own project which already specified a lambda.
The majority of the code has been untouched so it should work.

@DorianMazur
Copy link
Collaborator Author

@dnalborczyk Only one test is failing. Is this related to the change? I tested it locally and tests are passing (even with node 18 on macos)
image
image

@dnalborczyk
Copy link
Collaborator

thank you for the PR @DorianMazur . give me a couple days to have a look.

Only one test is failing. Is this related to the change? I tested it locally and tests are passing (even with node 18 on macos)

some of the tests can be a bit flaky at times. I re-ran the failed one.

@DorianMazur
Copy link
Collaborator Author

@dnalborczyk Thanks! It's working now

@temsa
Copy link

temsa commented Dec 6, 2022

@dnalborczyk it could be useful in my project, did you have a chance to review it already ? :)

@dnalborczyk dnalborczyk merged commit 56d986b into dherault:master Dec 6, 2022
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

3 participants