Closed Bug 977931 Opened 11 years ago Closed 11 years ago

hawkclient fails to throw the correct error when no response headers.

Categories

(Firefox :: Firefox Accounts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 30
Tracking Status
firefox29 --- fixed
firefox30 --- fixed

People

(Reporter: markh, Assigned: markh)

References

Details

Attachments

(1 file)

STR: * Start Fx with a signed in user, but with no internet connection available * Attempt to login. Actual: * Message appears in the log: 1393550554715 FirefoxAccounts DEBUG (Response) code: null - Status text: null ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "[JavaScript Error: "restResponse.headers is null" {file: "resource://services-common/hawkclient.js" line: 74}]'[JavaScript Error: "restResponse.headers is null" {file: "resource://services-common/hawkclient.js" line: 74}]' when calling method: [nsIStreamListener::onStopRequest]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0" data: yes] ************************************************************ and the correct error isn't propagated to the client. Expected: * Opposite of the above :) Problem is that in this scenario, restResponse.headers is null, so attempting to access restResponse.headers["retry-after"] fails. This is a regression caused by bug 945449
Attachment #8383423 - Flags: review?(spenrose)
Comment on attachment 8383423 [details] [diff] [review] 0003-Bug-return-an-error-object-even-when-restResponse.he.patch Thanks for the catch and the quick fix!
Attachment #8383423 - Flags: review?(spenrose) → review+
Assignee: nobody → mhammond
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment on attachment 8383423 [details] [diff] [review] 0003-Bug-return-an-error-object-even-when-restResponse.he.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 945449 User impact if declined: Sync will do strange things in some error cases. Testing completed (on m-c, etc.): m-c Risk to taking this patch (and alternatives if risky): Low - fix for bug 945449 String or IDL/UUID changes made by this patch: None
Attachment #8383423 - Flags: approval-mozilla-aurora?
Attachment #8383423 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 973967
Product: Core → Firefox
Target Milestone: mozilla30 → Firefox 30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: