Skip to content
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

Error handling for non amazon s3 providers. #76

Open
didactic-drunk opened this issue May 3, 2020 · 1 comment
Open

Error handling for non amazon s3 providers. #76

didactic-drunk opened this issue May 3, 2020 · 1 comment

Comments

@didactic-drunk
Copy link
Contributor

head_object raises XML::Exception. I think most providers use HTTP status codes for HEAD to indicate if an object exists or not.

All of the errors may have similar but I haven't had time to test them.

Tested with minio 2019-07...

@taylorfinnell
Copy link
Owner

It now raises Awscr::S3::Exception as of #66. It's probably only marginally better. It could be further improved to raise known exceptions (https://github.com/taylorfinnell/awscr-s3/blob/master/src/awscr-s3/exceptions.cr#L2) when they can be inferred from the http body and if they can't be inferred raise http based exceptions. Or, Awscr::S3::Exception could have the http status code attached to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants