digitalbazaar / digitalbazaar/webkms-client
More descriptive errors for edge cases
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
If the network infrastructure around a deployed webmks system is such that there are valid cases where a response with a status code other than 200 (or 400/500) is received, this should be caught and a descriptive error message originating in KmsClient should be thrown.
For instance, if a 302 is sent back in the response to getKeyDescription, there will be an empty or otherwise unexpected body for the subsequent methods to use, leading to uncaught errors being bubbled up. In this cause, when attempting to destructure id and type.
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 with KmsClient and lib/KeyAgreementKey.js around lines 86-91, then trace the getKeyDescription response handling. Reproduce a response with a status other than 200, 400, or 500 and ensure it produces a descriptive KmsClient error instead of an uncaught destructuring failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100