Uploaded image for project: 'Nuxeo JS Client'
  1. Nuxeo JS Client
  2. NXJS-122

Use the exception message when creating an Error

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Browser, Node.js
    • Tags:
    • Story Points:
      3

      Description

      After a fetch, If we got an HTTP status code >= 300, try to use the exception message when creating the Error object to have a meaningful message.

      Get the exception message only if the returned mime type is JSON.

      Note that if we get the message, the response body will be read so we need to store it on the Error also to avoid the body to be read again.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: