dataverse-client-javascript
dataverse-client-javascript copied to clipboard
Create the NotFoundError
Overview of the Feature Request
For now any error returned by the API in a read operation returns a ReadError, which includes the message with the HTTP error code as a very simple string, but we can define a new NotFoundError that extends ReadError also including more refined data. This way we can safely identify a not found error within the block catch of the promise, and carry out the necessary actions in the SPA.
What Inspired the Request?
- https://github.com/IQSS/dataverse-frontend/pull/352#discussion_r1549779417
What Existing Behavior Do You Want Changed?
Error handling
Any Brand New Behavior Do You Want to Add to js-dataverse?
New not found error
Any Open or Closed Issues Related to This Feature Request?
No