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

Deno v2.0 Deno.errors.PermissionDenied -> Deno.errors.NotCapable #491

Open
elmeunick9 opened this issue Sep 27, 2024 · 0 comments · May be fixed by #492
Open

Deno v2.0 Deno.errors.PermissionDenied -> Deno.errors.NotCapable #491

elmeunick9 opened this issue Sep 27, 2024 · 0 comments · May be fixed by #492

Comments

@elmeunick9
Copy link

The new version of Deno introduces some changes to the permission system, see.

Notably the introduction of Deno.errors.NotCapable breaks createParams here.

try {
    pgEnv = getPgEnv(); 
} catch (e) {
    if (e instanceof Deno.errors.PermissionDenied) {
        has_env_access = false;
    } else {
        throw e;
    }
}

I guess for backwards compatibility we should keep both?

  • deno-postgres version: 0.19.3
  • deno version: 2.0-rc
allout58 added a commit to allout58/deno-postgres that referenced this issue Oct 14, 2024
Updates usages of of `Deno.errors.PermissionDenied` to also support Deno v2's new `Deno.errors.NotCapable`.

Fixes denodrivers#491
@allout58 allout58 linked a pull request Oct 14, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant