Better imgproxyError handling

This commit is contained in:
DarthSim
2021-03-22 22:45:37 +06:00
parent cfe9578f50
commit 08b70d8b91
3 changed files with 9 additions and 9 deletions

View File

@@ -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)