IQSS / dataverse-client-javascript

A Dataverse client for JavaScript and TypeScript
MIT License
15 stars 8 forks source link

Create the NotFoundError #142

Open GPortas opened 6 months ago

GPortas commented 6 months ago

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?

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