Improve error messages on unexpected API responses
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Cases to cover:
* [x] A relation is accessed, but the API yields a primitive value #259
* [x] A relation is accessed, but the API yields no value for this relation name #259
* [ ] A primitive value is accessed, but the API yields a relation
* [ ] A primitive value is accessed, but the API yields no value for this property name
These cases usually result in obscure error messages like `t is not a function`, but only after the data has loaded from the API, i.e. inside a Promise.then(), which is really hard to understand for the hal-json-vuex user.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the Promise.then() path where API data is loaded and inspect how relation and primitive values are accessed. Cover the two unchecked cases: a primitive value receiving a relation, and a primitive value missing its property name; done means both produce understandable errors instead of messages such as `t is not a function`.
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
- 43/100