signalpoint / jDrupal

A JavaScript Library and API for Drupal Applications
http://jdrupal.tylerfrankenstein.com/
GNU General Public License v2.0
76 stars 38 forks source link

Updated non 200 status to return full response for more flexibility. #73

Closed jsheffers closed 7 years ago

jsheffers commented 7 years ago

Currently jDrupal returns only the statusText value from the XMLHttpRequest, but that doesn't allow me to use responseText or any other info from the request itself. This PR changes the promise rejection to return the entire response, which then developers can react on.

Related to this issue: https://github.com/signalpoint/jDrupal/issues/72

signalpoint commented 7 years ago

@jsheffers This is great, thank you very much.