acquia / waterwheel.js

A generic JavaScript helper library to query and manipulate Drupal 8 via core REST and JSON API
https://github.com/acquia/waterwheel.js
233 stars 26 forks source link

Update Axios version to 0.13.1 #34

Closed prestonso closed 7 years ago

prestonso commented 7 years ago

Updated Axios version to 0.13.1. To test, npm i to grab the new dependency from NPM, and npm t to make sure that all tests still pass on the new version of Axios.

brendan-hurley commented 7 years ago

See handling errors in 0.13.1 - there is a slight difference in behaviour from 0.11. I also noticed in here:

.catch(err => {
  const error = new Error(err.data.message);
  error.status = err.status;
  return reject(error);
});

When I forced a bad request response from Drupal the format of the message should come back like this: {"error":"A string must be provided as a bundle value."}

Do you know if Drupal would return it as message under come circumstances?

mattgrill commented 7 years ago

@creativebench Hi,

Yeah. Looks like we need to make a change to the error handling. This can easily happen in this PR. Thanks!