Cutehacks / duperagent

A QML clone of VisionMedia's SuperAgent module.
MIT License
56 stars 23 forks source link

Add response property to error objects #23

Closed edahlseng closed 5 years ago

edahlseng commented 5 years ago

This pull request adds a response property to error objects. This is modeled after SuperAgent, which describes this property in their section on error handling (emphasis mine):

Note that superagent considers 4xx and 5xx responses (as well as unhandled 3xx responses) errors by default. For example, if you get a 304 Not modified, 403 Forbidden or 500 Internal server error response, this status information will be available via err.status. Errors from such responses also contain an err.response field with all of the properties mentioned in "Response properties".

sirspudd commented 5 years ago

@jrbarron Shaper tools in the hizzy mofo; this change allowed us to roll with punches from our backend. XXXX