Fix json parsing exceptions obscuring server errors (#1605)
I got a 413 (Rate limit exceeded) error from the server while fetching prekeys. The client tried to parse the response as json since we expect json from the prekey endpoint, which threw an exception because the response was not json. This change prevents us from treating the response as json unless it has the Content-Type header set accordingly. If for some reason, the client and server disagree on whether the response should be or is json, we'll default to treating it as text. // FREEBIEpull/749/head
parent
1a2b123f31
commit
d1f7f5ee8c
Loading…
Reference in New Issue