Closed Bug 1044528 Opened 10 years ago Closed 7 years ago

HawkClient._constructError should return something with a .toString()

Categories

(Firefox :: Firefox Accounts, defect)

defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rfkelly, Unassigned)

Details

(Whiteboard: [qa?])

Errors from HawkClient do not have a .toString() so when they show up in sync logs (wrapped in an AuthenticationError) they look like this:

"""
1406043502616	Sync.BrowserIDManager	ERROR	Failed to fetch a token for authentication: AuthenticationError([object Object])
"""

The main AuthenticationError class implements a nice .toString() method for debugging purposes, and assumes that the error it wraps will do the same.  It would be nice to implement this on HawkClient errors to aid debugging.

(See Bug 1042109 Comment 11 for an example of where this showed up)
Whiteboard: [qa?]
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Core → Firefox
You need to log in before you can comment on or make changes to this bug.