-
Notifications
You must be signed in to change notification settings - Fork 559
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
NullPointerException if calling lambda without http headers #232
Comments
Any updates on this? CheckWebsiteScheduledEvent:
Type: Schedule
Properties:
Schedule: rate(5 minutes) UPDATE: Actually, in my case it is a little bit differnt, created separate issue: #237 |
@sapessi I can fix it if you like and you can review the code. Would that be fine? |
The issues are not related. Working to replicate and push a fix for this now. It will go out as a patch release. |
Closing since version |
@sapessi Thanks very much!!! |
Hi Stefano, As per our conversation over the chime, here is the Issue for the NPE
Scenario
I was recently trying out to develop a microservice using Java based lambda using spring boot. After following all the instruction, my requests continuously failed giving NullPointerException while testing the lambda endpoint using Test console of API Gateway. The API Gateway is using Lambda Proxy integration to route the endpoint params to lambda.
Expected behavior
It shouldnt give NPE
Actual behavior
Giving below exception
Steps to reproduce
Full log output
After reviewing your code of AwsProxyHttpServletRequestReader.java, I think as a best practice, we should write NPE free code as line below in highlighted in proned to NPE in case the Content-type header is not sent in the request. Although very rare to be null but still to have check on NPE in the code and avoid failing the requests.
The text was updated successfully, but these errors were encountered: