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
Recover for panics in function Handler for HTTP mode #27
Comments
I like this, is it something you would be willing to also contribute? |
@LucasRoesler Sure |
Hi, thanks for your suggestion. This is actually by design. I think that it should fail and that the container should be restarted. If someone has a specific need for a catch-all, then the PR can be forked. I might change my mind in the future, but this is where I am on it at the moment. Alex |
That make sense. One can handle the panic inside the request handler itself and return a response accordingly. It gives more flexibilities to determine whether to recover or not |
I appreciate the suggestion. Please keep on helping us to make OpenFaaS better 👍 |
/add label: wontfix |
In current code we are calling the http function handler as
In case there is a panic inside the handler the
handler
server process will exit, failing the future requests for the same.Optionally it can be handled with a
recover
as:In this case the
handler
server keep runningThe text was updated successfully, but these errors were encountered: