1
0
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:
Carson Brown
2025-11-17 12:14:46 -05:00
committed by GitHub
parent 97ed9aaec1
commit 8a62a87978

View File

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