GoogleCloudPlatform / GoogleCloudPlatform/functions-framework

Clarify error handling expectations

Open
#46 5 comments 0 reactions 1 assignee Claimed by @anniefu View on GitHub
enhancement
Dominant language
No language data
Stars
166
Forks
14
PR merge metrics
No merged PRs in 30d

Description

In #15 a set of typical HTTP response codes was documented, however, in working on the PHP functions framework we have found there's a lot that remains undefined in how errors should be handled.

https://github.com/GoogleCloudPlatform/functions-framework-php/issues/60 demonstrates the only definition is triangulating against the behaviors of other functions frameworks, which include some behaviors in the name of backwards compatibility that are not intended as part of the functions framework specification.

## Actual

Each language makes independent decisions around error handling, including:
* Handling the `X-Google-Status` custom HTTP header
* What error message is returned in the body of the response
* Reliable use of error status codes in all edge cases
* Generation of a stack trace/integration with Error Reporting

## Expected

Functions frameworks provide a consistent experience in surfacing errors such as HTTP Functions and CloudEvent Functions present a language agnostic programming paradigm for service-to-service communications.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.