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

Document list of error codes #15

Closed
grant opened this issue Jan 13, 2020 · 5 comments
Closed

Document list of error codes #15

grant opened this issue Jan 13, 2020 · 5 comments
Assignees

Comments

@grant
Copy link
Contributor

grant commented Jan 13, 2020

The types of errors in the Function Frameworks should be described and standardized across languages.
This should include 400 and 500 errors.
400s: 400 Bad requests, 404s, 405s method not allowed
500s: Internal errors seen by the Functions Framework

@grant
Copy link
Contributor Author

grant commented Mar 11, 2020

@grayside What do you think about documenting this expected behavior of HTTP status codes in the Functions Framework contract for HTTP-triggered functions? Anything I could be missing?

@grayside
Copy link
Contributor

Hello Grant, I recommend documenting HTTP error codes the framework would use itself and not others, your list seems right to me.

I've also seen error codes such as 5 in the CloudEvents mode with the nodejs framework, could we get those documented as well?

@grant
Copy link
Contributor Author

grant commented Mar 12, 2020

Thanks for the reply Adam. I don't know of error codes such as 5.
Here is the spec:
https://github.com/cloudevents/spec/blob/master/primer.md#protocol-error-handling

I've looked at the Node.js Framework source and found some interesting cases but nothing like a non-HTTP error codes or common Node error codes.

@grayside
Copy link
Contributor

I've double-checked, and found 5 NOT_FOUND: <...> which looks like its coming from a pre-alpha library. This is probably a gRPC error code which neither my code nor the functions framework wrapped for better context. This probably doesn't affect this issue, but possibly is a consideration for error handling.

@grant
Copy link
Contributor Author

grant commented Apr 23, 2020

A few of us have talked about this topic in the .NET FF meeting. Greg Block chimed in.

I've created a proposal for documenting the acceptable error codes in the PR above.

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

2 participants