dataverse-client-javascript icon indicating copy to clipboard operation
dataverse-client-javascript copied to clipboard

Create the NotFoundError

Open GPortas opened this issue 10 months ago • 0 comments

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

GPortas avatar Apr 08 '24 08:04 GPortas