question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very partial list of errors defined in smithy S3 model

See original GitHub issue

Hi

For context:

When I look at the S3 smithy model, I find that it lacks a lot of error definitions for operations. Here is a list of all the operations that have errors defined:

$ node -e 'm=require("./smithy-rs/aws/sdk/aws-models/s3.json"); Object.entries(m.shapes).forEach(([n,s])=>{ if (s.type==="operation" && s.errors) console.log(n, "---", s.errors.map(x=>x.target).join(",")); })'
com.amazonaws.s3#AbortMultipartUpload --- com.amazonaws.s3#NoSuchUpload
com.amazonaws.s3#CopyObject --- com.amazonaws.s3#ObjectNotInActiveTierError
com.amazonaws.s3#CreateBucket --- com.amazonaws.s3#BucketAlreadyExists,com.amazonaws.s3#BucketAlreadyOwnedByYou
com.amazonaws.s3#GetObject --- com.amazonaws.s3#InvalidObjectState,com.amazonaws.s3#NoSuchKey
com.amazonaws.s3#GetObjectAcl --- com.amazonaws.s3#NoSuchKey
com.amazonaws.s3#HeadBucket --- com.amazonaws.s3#NotFound
com.amazonaws.s3#HeadObject --- com.amazonaws.s3#NotFound
com.amazonaws.s3#ListObjects --- com.amazonaws.s3#NoSuchBucket
com.amazonaws.s3#ListObjectsV2 --- com.amazonaws.s3#NoSuchBucket
com.amazonaws.s3#PutObjectAcl --- com.amazonaws.s3#NoSuchKey
com.amazonaws.s3#RestoreObject --- com.amazonaws.s3#ObjectAlreadyInActiveTierError

This is clearly a tiny fraction of the real errors that this API can return. See https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

Is there a way to contribute to the model definition to make it represent the S3 errors correctly?

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kellertkcommented, Oct 19, 2022

Hi there. Since this is a cross-SDK issue I’ve created a tracking issue at aws/aws-sdk#376. Please follow that issue for updates instead.

0reactions
guymguymcommented, Apr 26, 2022

Thank you @gosar - I really appreciate your update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Core Specification - Smithy 2.0 - Open Source at AWS
An AWS service is defined using the aws.api#service trait. This trait provides information about the service like the name used to generate AWS...
Read more >
1. The Smithy model
Defines a list of common errors that every operation bound within the closure of the service can return. Each provided shape ID MUST...
Read more >
Error Responses - Amazon Simple Storage Service
Error Code Description HTTP Status Code AccessControlListNotSupported The bucket does not allow ACLs. 400 Bad Request AccessDenied Access Denied 403 Forbidden BucketAlreadyOwnedByYou 409 Conflict (in all...
Read more >
Smithy: A language for defining services and SDKs
Think joining multiple microservices in to a single public interface or splitting out different service/client models based on tags or traits.
Read more >
Client in aws_sdk_s3::client - Rust - Docs.rs
If you specified server-side encryption either with an Amazon S3-managed ... check to ensure that the encryption key was transmitted without error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found