This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Can't use errors.Is()
and errors.As()
with s3's ListParts()
#63
Comments
errors.Is()
and errors.As()
with s3's ListParts()
errors.Is()
and errors.As()
with s3's ListParts()
Thanks for letting us know. S3 does not model |
3 tasks
P71069218 |
Hi, S3 now has proper error modeling for non existent upload, the API now returns a <?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchUpload</Code>
<Message>The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.</Message>
<UploadId>uploadID</UploadId>
<RequestId>REDACTED</RequestId>
<HostId>REDACTED</HostId>
</Error>
Thanks again, |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When using
ListParts
to list the parts of a multipart upload, if the upload does not exist, aNoSuchKey
error is returned. This is evident when printing the error:https response error StatusCode: 404, RequestID: tx00000000000000000095a-00608116e2-1014-default, HostID: 1014-default-default, api error NoSuchKey: UnknownError
.The problem is that the
types.NoSuchKey
error is not in the error chain, so it is impossible to useerror.Is()
orerrors.As()
to unwrapped the error chain into atypes.NoSuchKey
.Version of AWS SDK for Go?
Example: v1.3.3
Version of Go (
go version
)?1.16.2
To Reproduce (observed behavior)
Expected behavior
Is NoSuchKey error
should be printed.The text was updated successfully, but these errors were encountered: