diff options
author | Luca Casonato <hello@lcas.dev> | 2024-09-10 20:12:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 11:12:24 -0700 |
commit | 7bfcb4dd10d31f5f9566c90a28449c0951f3a48e (patch) | |
tree | fca0dec6e98118418f1712c6e8451a04c7e89988 /runtime/permissions | |
parent | be5419d479fcae16c8a07dec00ce11b532b7996a (diff) |
feat(cli): use NotCapable error for permission errors (#25431)
Closes #7394
---------
Co-authored-by: snek <snek@deno.com>
Diffstat (limited to 'runtime/permissions')
-rw-r--r-- | runtime/permissions/lib.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index c5cfbff70..36750ae38 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -144,7 +144,7 @@ impl PermissionState { name ) }; - custom_error("PermissionDenied", msg) + custom_error("NotCapable", msg) } /// Check the permission state. bool is whether a prompt was issued. @@ -1999,10 +1999,7 @@ fn parse_run_list( } fn escalation_error() -> AnyError { - custom_error( - "PermissionDenied", - "Can't escalate parent thread permissions", - ) + custom_error("NotCapable", "Can't escalate parent thread permissions") } #[derive(Debug, Eq, PartialEq)] |