Comments (5)
v2 correctly handles the response (with a few more internal exceptions than I'd like), but it is currently a pain for users to actually handle the response: catching AmazonS3Exception and checking ErrorCode == "NotModified" seems to be the only way to handle it currently, and it doesn't look like ErrorCode values are documented (perhaps falling back to the REST api docs?).
I would like to see some form of explicit handling of NotModified, preferably in an exception-free path (to make first-chance exception debugging less of a pain in the ass).
I notice that NotFound is similarly not explicitly handled, which is weird: being able to get an object or metadata if it exists seems like it should be common?
from aws-sdk-net.
Thanks for this suggestion.
Making this change outright will be a breaking change for users who are expecting this exception, but we will consider a mechanism to support this that may be opt-in.
Can you clarify the last sentence of your last message regarding the handling of NoutFound?
from aws-sdk-net.
From my reading of my comment 5 months ago, it looks like I was saying it makes sense to also have an explicit not found exception and/or an exception-free path for 404 responses. That is, it should be possible to try to get an S3 object and handle it not being there without catching an exception. Preferably not throwing any first-chance exceptions, as that makes debugging significantly less annoying (with things like ELMAH, breaking on uncaught exceptions might not be easy to get working)
from aws-sdk-net.
Thanks for the follow-up. The V2 SDK already has some of this logic, to not throw on 404s in some cases, but we will be working to extend this. Will update this issue when we add this functionality.
from aws-sdk-net.
Closing this for lack of activity
from aws-sdk-net.
Related Issues (20)
- Amazon.BedrockRuntime.Model.ValidationException: "claude-3-sonnet-20240229" is not supported on this API HOT 4
- AmazonCloudWatchLogsClient.GetLogEvents does not return any event HOT 3
- TargetFramework in AWSSDK.Core uses non-documented string for .net8 HOT 1
- AssumeRoleAWSCredentials can not be configured to use regional endpoints HOT 5
- AmazonCloudFrontUrlSigner.GetCannedSignedURL always throw exception HOT 5
- AWS Trusted Advisor List endpoints failing when paginating HOT 3
- Synchronous Lambda Timeout with Lambda SDK invocation HOT 8
- AWSSDK.Extensions.NETCore.Setup support for RDSAuthTokenGenerator HOT 2
- AWS SDK not working on Android build HOT 6
- Incorrect behaviour of S3 client with minio and Gitlab ci HOT 3
- Incorrect behavior when deleting a message that's already been moved to the DLQ HOT 2
- AWSSDK.S3 3.7.307.4 escapes colon in bucket name in GetPreSignedURL HOT 7
- AWSSDK.Core triggers CWE-798 - Hardcoded credentials HOT 9
- Amazon.S3.AmazonS3Exception (Error making request with Error Code Forbidden and Http Status Code Forbidden) with Polygon.io HOT 5
- NET core doesn't has S3FileInfo class HOT 2
- DynamoDB Object persistence Model does not respect `required` keyword HOT 5
- AmazonBedrockAgentRuntimeClient.RetrieveAndGenerateAsync throws an exception HOT 4
- Amazon.IdentityStore CreateUser Not Sending Email Verification Link HOT 2
- SQS 3.7.201.0+ GetQueueAttributesAsync with "All" does not work when trying to fetch queue attributes HOT 1
- How to set ExternalId when using AWSSDK.Extensions.NETCore.Setup HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-net.