Skip to content

Fix Lambda Instrumentation for non existent status code #2346

@AlexanderWert

Description

@AlexanderWert

With API Gateway trigger v1 on the lambda instrumentation the following happens, if the instrumented code does not explicitly set the status code on the response object:

  • The statusCode variable is an Integer object on the APIGatewayProxyResponseEvent(used with API Gateway v1 triggers)
  • this statusCode is not initialized properly with the constructor of APIGatewayProxyResponseEvent
  • thus, if the instrumented code does not set the statusCode explicitly, then the value is null
  • the lambda instrumentation then fails with a NPE at this stage

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions