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 Error with 0.7.0 which does not appear with 0.1.0 #18

Open
Mojo90 opened this issue Feb 25, 2017 · 2 comments
Open

404 Error with 0.7.0 which does not appear with 0.1.0 #18

Mojo90 opened this issue Feb 25, 2017 · 2 comments

Comments

@Mojo90
Copy link

Mojo90 commented Feb 25, 2017

My current stack is swagger-node with aws-serverless-express to be able to deploy the complete rest-api to one aws lambda function. (reproduce stack from here: ashiina/lambda-local#69 (comment)).

Now as discussed in another Thread by swagger project create hello-world it does automatically use 0.1.0 of swagger-express-mw. So I updated manually to 0.7.0 and added -swagger_params_parser
to my config/default.yaml. Now it does work but the only thing is that I get a 404 for the first lambda invocation and from the 2nd invocation onwards it works as expected. If the function sleeps for long time a cold start is done and the first invocation is again a 404 (error described here: http://stackoverflow.com/questions/42190508/aws-api-gateway-cannot-get-when-function-sleeped-for-long-time).

Do you have any ideas why this does not happen with version 0.1.0 but only with 0.7.0?
(I just realised that it comes from this module because I generated a new minimal test project and there it worked with 0.1.0, but I prefer to use 0.7.0 as there is usage of Sway, which replaces swagger-tools as I understood)

@Mojo90 Mojo90 changed the title Error with 0.7.0 which does not appear with 0.1.0 404 Error with 0.7.0 which does not appear with 0.1.0 Feb 25, 2017
@manvscode
Copy link

+1

@ptimson
Copy link

ptimson commented Oct 11, 2017

I can't seem to get it working at all - I always seem to get a 404.

However I was wondering if you are seeing a 404 the first time is it because the SwaggerExpress.create hasn't completed so swaggerExpress.register(app) hasn't run before the .proxy is called?

Could you provide all of the response body / logs from AWS Lambda

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

3 participants