inrupt / inrupt/solid-client-notifications-js
Throw meaningful error on non-supported providers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 3
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
Currently when 'trying' to get the notification gateway from a pod provider; it will extract the gateway
from .well-known/solid. Not supported providers will not have the notificationGateway option.
This causes a fetch on an undefined URL causing an non-descriptive error:
https://github.com/inrupt/solid-client-notifications-js/blob/4eda50a44e489062621ceb586685a4fbbfce1fc7/src/notification.ts#L166
Would it be an option to throw a more meaningful error before the above line that identifies the provider as unsupported?
Contributor guide
No contributing guide indexed for this repository
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/notification.ts at the linked location around line 166, where the notification gateway is fetched after provider discovery. Confirm how a missing notificationGateway is handled, then verify that unsupported providers produce a descriptive error instead of attempting a fetch with an undefined URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100