wordpress-api-client icon indicating copy to clipboard operation
wordpress-api-client copied to clipboard

Errors often fail before reporting because of fetchResponse.json()

Open braco opened this issue 2 years ago • 0 comments

    const json = await error.json();
                             ^
TypeError: error.json is not a function
    at getErrorMessage (wordpress-api-client/dist/util.js:35:30)

Errors often won't have a JSON response to parse, so this line will fail

braco avatar May 06 '23 00:05 braco