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

[BUG] On network PermissionDenied errors, hint to the user to check their outgoingDomains manifest field #59

Open
filmaj opened this issue Nov 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@filmaj
Copy link
Contributor

filmaj commented Nov 24, 2023

Description

If you leave the outgoingDomains field empty in your manifest.ts, but do end up interacting with a third party service on some domain, the error you will see at runtime after you slack run or slack deploy your app will be something like:

error PermissionDenied: Requires net access to "stripe.com", run again with the --allow-net flag
    at opFetch (ext:deno_fetch/26_fetch.js:73:14)
    ..........
  name: "PermissionDenied"
}

Could we catch this error within the runtime, and log out to the check the outgoingDomains field in the app manifest (or even make that check for the user, is that possible? not sure if the runtime has access to the manifest though) as a hint to the user, and then re-raise the error?

EDIT: as pointed out by @mcodik, this should already be happening? See this code.

@filmaj filmaj added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Nov 24, 2023
@filmaj filmaj changed the title [FEATURE] On network PermissionDenied errors, hint to the user to check their outgoingDomains manifest field [BUG] On network PermissionDenied errors, hint to the user to check their outgoingDomains manifest field Nov 28, 2023
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

No branches or pull requests

1 participant