Correctly deal with non-200 responses from the twitter and facebook APIs

RESOLVED FIXED in M2

Status

Pancake
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: st3fan, Assigned: st3fan)

Tracking

Details

(Assignee)

Description

6 years ago
Right now the app simply tries to parse the content as json, which throws an exception if the request to the API failed. We should look at the status code and log an error in case it is not 200 OK.
(Assignee)

Comment 1

6 years ago
Fixed with https://bitbucket.org/mozillapancake/pancake/changeset/e9d6d11ddc1e

Refactored the social code. Throw out old code. Added exception handlers around stuff that can fail. Made it not fail completely if anything happens, it will mostly just return an empty results list and log the exception.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.