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)
- Unable to connect to Timestream from using endpoint (.Net) HOT 8
- DynamoDB SDK convert Nullable DateTime to Local HOT 4
- When cancelled, dynamodb.eu-west-1.amazonaws.com throws an exception instead of returning HTTP code HOT 2
- There is no way to get bedrock streaming api responses using async io. HOT 8
- V4 Development Tracker HOT 2
- Upcoming Observability Features in AWS SDK for .NET HOT 4
- Disable Expect100Continue and how to sub-class S3 Requests HOT 1
- AmazonBedrockRuntimeClient and anthropic.claude-3-5-sonnet-20240620-v1:0 throw exception HOT 2
- [v4] `CryptoUtil` refactoring opportunities. HOT 1
- SSO fails with "Failed to find sso_session" HOT 5
- SQS poll exception: System.InvalidOperationException: Collection was modified HOT 10
- AWSSDK.DynamoDB uses 'System.Net.Http.HttpClientHandler.Send' method which produces a 'System.PlatformNotSupportedException' in MAUI apps targeting Android/iOS - Use method 'SendAsync' instead, which is supported. HOT 5
- S3Control CreateJobAsync with LambdaInvoke throws 'Request invalid' exception due to empty UserArguments
- IoT Core MQTT with SQS and .NET Framework 4.8 intermittently drops payload attribute HOT 4
- Return MemoryStreams with accessible buffers HOT 7
- Do not create strings just for comparison HOT 4
- Avoid StringBuilder.AppendFormat HOT 3
- Avoid creating unnecessary intermediate strings HOT 3
- Migrating from .Net 6 to .Net 8 HOT 4
- Using the SDK in web application testing broken (.NET 8 URI canonicalization) HOT 6
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.