400 Bad Request vs. 500 Internal Server Error
In case of an unexpected exception, I'm curious why the response status code is 400 (client error) instead of 500 (server error).
https://github.com/Eventuous/eventuous/blob/2f0415a637a4b5d163da27558bc0cec8f44c972a/src/Extensions/src/Eventuous.AspNetCore.Web/ResultExtensions.cs#L11
Is there anything that can be changed on the client side to help fix the error? I guess it's not the case.
I can imagine that there are many things on the server-side that could go wrong, e.g., interacting with network services (storage) that can suffer from intermittent connectivity errors; or simply a bug in the application code (more likely) or library code (less likely). This would justify the 500 status code, not 400, in my opinion.
Any thoughts or comments on that?
Thanks!
I don't think it's possible to easily change it to be configurable, but you are totally right, it should be 500.