Hi! We have a customer who is attempting to use a product (mimir) that uses this library but their "S3-compatible" object store returns this for a 404:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><Error><Code>404</Code><Message>No message</Message><RequestId>5cd29bba-dc52-41f7-a655-46180f123d6c</RequestId></Error>
Ie it is putting 404 as the error code instead of NoSuchKey. It is however reporting the HTTP status as 404 correctly.
mimir is calling IsObjNotFoundErr (here) to see if a particular error was that an object is not found. This currently fails because the Code is wrong, but we do have the HTTP status available.
In this case we should fall back to looking at the HTTP status code. I think it's just a matter of adding a || minioError.StatusCode == http.StatusNotFound to the test.
Hi! We have a customer who is attempting to use a product (mimir) that uses this library but their "S3-compatible" object store returns this for a 404:
Ie it is putting
404as the error code instead ofNoSuchKey. It is however reporting the HTTP status as404correctly.mimir is calling
IsObjNotFoundErr(here) to see if a particular error was that an object is not found. This currently fails because theCodeis wrong, but we do have the HTTP status available.In this case we should fall back to looking at the HTTP status code. I think it's just a matter of adding a
|| minioError.StatusCode == http.StatusNotFoundto the test.