slackapi / slackapi/deno-slack-runtime
[BUG] On network PermissionDenied errors, hint to the user to check their `outgoingDomains` manifest field
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/dispatch-payload.ts around line 94, which the issue links as existing handling for this error. Reproduce a network PermissionDenied error with an empty outgoingDomains field after slack run or slack deploy, then verify whether the runtime logs a manifest hint and re-raises the error; done means the behavior is confirmed or the missing case is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100