AFNetworking/AFNetworking — pull request #1022 by geoffnix (2013-05-22 21:27:06+00:00)
Title: Raise error if unable to decode response string

https://github.com/AFNetworking/AFNetworking/pull/876 fixes a character encoding crash by hard-coding the encoding to `NSUTF8StringEncoding`, but assumes `dataUsingEncoding:` will succeed. This patch checks for a non-nil return value to prevent the crash in `JSONObjectWithData:options:error:`. If the `NSData` is nil, it sets `self.JSONError` to an error including the response string.