Shopify/chocolatechipjs-pub — pull request #4 by sebmartin (2014-11-25 14:26:10+00:00)
Title: Changes the the ajax error handling to only fail the promise once the re...

The original implementation of the $.ajax handler would fail the promise as soon as the header was received with a 4xx level response code.

This change does two things:
- Delays failing the promise until we reach readyState == 4 (DONE)
- Call `promise.notify` so that the receiver can get called for each readyState. This would allow them to fail fast if they really wanted this behaviour.

@nsimmons @pseudomuto