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

Panic when bucket doesn't exists #42

Closed
nitisht opened this issue Aug 17, 2022 · 0 comments · Fixed by #45
Closed

Panic when bucket doesn't exists #42

nitisht opened this issue Aug 17, 2022 · 0 comments · Fixed by #45
Assignees
Labels
bug Something isn't working

Comments

@nitisht
Copy link
Member

nitisht commented Aug 17, 2022

Server logs panic error when a bucket as the Parseable storage is not provided.

thread 'actix-rt|system:0|arbiter:2' panicked at 'called `Result::unwrap()` on an `Err` value: Storage(NoSuchBucket(NoSuchBucket { message: Some("The specified bucket does not exist") }))', server/src/handlers/logstream.rs:79:60

We need to handle the properly and log a better error - and not start the server if bucket doesn't exist.

@nitisht nitisht added the bug Something isn't working label Aug 17, 2022
nitisht pushed a commit that referenced this issue Aug 18, 2022
Create a separate error type for all the methods defined by ObjectStorage.
This ObjectStorageError should contain those failure variants over which 
we want to handle error in future.

AwsSdkError and SdkError in AWS S3 crate covers all the variants for 
failure when calling S3 APIs but parseable needs to have its own Error
type that can be used for error handling in the application itself.

Added ObjectStorageError type which contains some variants through 
which we can tell what went wrong when using any of trait methods 
on S3 object. Though the error variants need to expand in future so 
that more complex cases could be handled correctly.

Fixes #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants