-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# SDK: How to determine if GetObjectAsync succeeded? #261
Comments
Looking at the other SDKs, i see its the same in Java, but in Go statObject is not suggested, so i assume the returned error would indicate that the object was not found? |
@petertiedemann, minio-dotnet does a StatObject internally - I see a ObjectNotFoundException when GetObjectAsync is attempted on a non-existent object
|
ok, I see a bug in this GetObjectAsync api call where we are not doing a stat prior to fetching - will fix it.
The other API call should work -
|
@poornas Thanks for the super prompt responses, and especially the follow-up answer because i thought i had gone crazy because suddenly i was getting the exception (because i was trying a different overload i guess :) Btw, the overload with ServerSideEncryption is not present in the nuget i am using it seems? ( i am using Minio 2.0.6 on .net standard 2.0 ) |
@petertiedemann, the serverside encryption feature is still in review #259, after merging that to master we would make a release |
Ah okay, thanks. Just got worried if I was on the wrong version. Minio is looking really good so far. |
fixed by #260 |
When accessing an object with a key that does not exist, the stream provided by
GetObjectAsync
contains an XML error and does not throw and error when read, How should a caller avoid returning this XML error string in place of an actual string? I realize it is possible to call StatObjectAsync first, but that raises concerns about what happens if stat is called first, then before getobject a remove call is made.Expected Behavior
I would expect an exception from GetObjectAsync if the object could not be retrieved.
Current Behavior
The stream contains an XML string:
Possible Solution
Steps to Reproduce (for bugs)
Call GetObjectAsync and provide a non-existing object key.
Context
I am concerned about concurrency problems with remove operations.
Your Environment
minio version
): 2018-12-13T02:04:19Zuname -a
): Windows 10The text was updated successfully, but these errors were encountered: