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

Do not panic inside driver's code #13

Open
leszko opened this issue Jan 30, 2023 · 1 comment
Open

Do not panic inside driver's code #13

leszko opened this issue Jan 30, 2023 · 1 comment

Comments

@leszko
Copy link
Contributor

leszko commented Jan 30, 2023

No description provided.

@leszko
Copy link
Contributor Author

leszko commented Jan 31, 2023

Comments from @victorges

An alternative could be returning a "broken session" that returns errors for all function calls. The nil session should just cause a panic as well on code that ends up going this.

The basic thing I don't like about a panic or nil here is that it can be caused entirely by user input. The same code that works for an s3+https driver would explode is the user input is changed to w3s instead.

So I'd be fine with any handling of the filename here even if not super useful to avoid panicking on consumer code. Like returning the failed session, or maybe just prepending every file name in the CAR with the one provided for the session here.

Ok doing this as a follow-up or even just filling an issue to figure out a better error handling for the w3s session.

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

1 participant