Closed Bug 965962 Opened 11 years ago Closed 11 years ago

Fix or explain FxAccountsClient xhr.onload() error handling

Categories

(Core Graveyard :: Identity, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: spenrose, Assigned: jedp)

References

Details

The onload() method that FxAccountsClient uses to receive responses from fxa-auth-server defines a response as constituting an error this way (xhr is the HTTP response object, "response" is the body parsed as JSON): if (xhr.status !== 200 || response.error) { I do not see any corresponding messages in the server API definition: https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md Can we delete the "|| response.error" expression?
Per comments in Bug 957863, I'm revising that code to do away with xhr and replacing it with a hawk-authenticated RESTRequest object. I'll have a patch today, so maybe hold off on getting too deep into the code yet. Let me look for the 200-and-yet-response.error thing. I'm sure I got that from somewhere.
Here's where I am with that patch: https://bugzilla.mozilla.org/show_bug.cgi?id=957863#c27 About ready to ask for r
XHR monster slain by Jed in 943521
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: spenrose → jparsons
Depends on: 943521
Target Milestone: --- → mozilla30
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.