mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-09 19:52:30 +02:00
Better imgproxyError handling
This commit is contained in:
@@ -102,14 +102,7 @@ func withSecret(h routeHandler) routeHandler {
|
||||
}
|
||||
|
||||
func handlePanic(reqID string, rw http.ResponseWriter, r *http.Request, err error) {
|
||||
var (
|
||||
ierr *imgproxyError
|
||||
ok bool
|
||||
)
|
||||
|
||||
if ierr, ok = err.(*imgproxyError); !ok {
|
||||
ierr = newUnexpectedError(err.Error(), 3)
|
||||
}
|
||||
ierr := wrapError(err, 3)
|
||||
|
||||
if ierr.Unexpected {
|
||||
reportError(err, r)
|
||||
|
Reference in New Issue
Block a user