Skip to content

Handle thrown exceptions consistently with other frameworks #422

@anniefu

Description

@anniefu

There are two scenarios where Node behaves different from most other Functions Frameworks

  1. User throws an exception in their function code
  2. User returns an error in their event-driven function code (HTTP functions don't have return parameters)

Most frameworks will return HTTP status code 500 in both those cases, and hide the exception/error message from the invoker.

Node returns 200 status code and returns the exception/error message in the response body. We should modify node to return 500 and omit the exception/error message from the response body to avoid leaking debug information to the invoker. We should log the message instead.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions