The exception-parsing code falls over if the WWW-Authenticate header is capitalized in a non-standard way (Www-Authenticate, for instance). The HTTP spec requires case-insensitive lookup for headers.
I ran into this issue when testing FbGraph code with WebMock, which oh-so-helpfully "normalizes" headers to only have capital letters at the beginning of each dash-delimited word.
handle mixed-case HTTP headers correct, per the spec
Merge pull request #197 from al2o3cr/handle-header-capitalization
handle mixed-case HTTP headers correctly, per the spec