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

Introduce a "NotCapable" error #7394

Closed
caspervonb opened this issue Sep 8, 2020 · 4 comments · Fixed by #25431
Closed

Introduce a "NotCapable" error #7394

caspervonb opened this issue Sep 8, 2020 · 4 comments · Fixed by #25431
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@caspervonb
Copy link
Contributor

Right now we do not differentiate between errors raised by our sandbox and actual permission errors raised by the operating system (altho you can visually distinguish them if you squint and scan carefully for errno 13 which is EPERM).

I think WASI does this better in that it distinguishes between EPERM which is just errno EPERM and provides an additional extended errno enumeration member ENOTCAPABLE which is raised when the caller is not capable (it's a capability based sandboxing model) of performing an operation.

The benefit of separating these is that NotCapable (name subject to bike-shedding) is potentially a recoverable state; you can ask for permissions where-as PermissionDenied is just defacto this is not allowed and won't be allowed without external intervention.

@caspervonb
Copy link
Contributor Author

caspervonb commented Sep 8, 2020

This would be a fairly fundamental breaking change as current error instanceof checks would quietly start failing; so it would have to be for a 2.0 milestone.

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@caspervonb
Copy link
Contributor Author

Still very much something I want to change for 2.0, tag as suggestion please.

@stale stale bot removed the stale label Jan 6, 2021
@lucacasonato lucacasonato added the suggestion suggestions for new features (yet to be agreed) label Jan 6, 2021
@kitsonk kitsonk mentioned this issue Sep 17, 2021
17 tasks
@kitsonk kitsonk added this to the 2.0.0 milestone Sep 17, 2021
@hazae41
Copy link
Contributor

hazae41 commented Sep 28, 2021

👍 Sounds like HTTP errors Forbidden and Unauthorized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants