sadlerjw/RestKit — pull request #2 by sadlerjw (2014-02-21 16:39:14+00:00)
Title: Include request/response details in mapped error

When a non-200-series HTTP status code is received and there is no object
mapping set up to handle it, an NSError is generated that includes the response
string, the request's URL, and the request and response objects themselves. This
allows consumers of RestKit to inspect these objects (for instance, to find out the
status code) in order to determine the correct course of action.
(See RKHTTPRequestOperation's `error` method)

When an object mapping does exist for non 200-series status codes, the mapped
error does not include this information - it only includes the mapped error(s) and
a localized description. This leaves RestKit consumers no idea of what the HTTP
status code was, which is usually important information when determining how to
react to an error.

This commit adds URL, request, and response to the NSError object, but does not
add responseString, because the same information is conveyed by the mapped
error object(s).