You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-23 22:34:44 +02:00
Return 404 for missing GCS objects (#1576)
* fix(gcs): correctly detect wrapped not-found errors using errors.Is * refactor(gcs): simplify error handling logic with guard clause
This commit is contained in:
@@ -187,7 +187,7 @@ func (t transport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
}
|
||||
|
||||
func handleError(req *http.Request, err error) (*http.Response, error) {
|
||||
if err != storage.ErrBucketNotExist && err != storage.ErrObjectNotExist {
|
||||
if !errors.Is(err, storage.ErrBucketNotExist) && !errors.Is(err, storage.ErrObjectNotExist) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user