Closed s8sg closed 5 years ago
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 running