Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve error handling to prevent panics
In some scenarios, the status code of the response object was set to 200, but the error was non nil. The middleware was logging 200, but echo was actually responding with 500. In other scenarios, the status code of the response was set to 500, but the error was nil. The middleware was checking the status code of the response and if it was not ok, it tried to log the error message, which resulted in a panic. This patch should make error handling more robust. Signed-off-by: Michal Wasilewski <[email protected]>
- Loading branch information