Open Bug 1063163 Opened 10 years ago Updated 2 years ago

The hawkclient error object is handled inconsistently

Categories

(Firefox :: Sync, defect, P5)

defect

Tracking

()

People

(Reporter: Paolo, Unassigned)

References

Details

(Whiteboard: [qa-])

While working on bug 1059754, we found out that the error object returned for hawk requests can either represent a protocol error, or be something special representing an exception, for example in the case of network timeouts.

In the first case, the "error" property of the returned object is a string. In the others, it can be a Components.Exception, an Error, and maybe other object types. This caused the code that tried to clone the object into an unprivileged page to fail in some cases. Bug 1059754 worked around this.

We think the types of the properties on the error object should be consistent, or at least have a distinct "exception" property for unexpected cases.
Whiteboard: [qa-]
This inconsistency rears its head in Sync errors as well.
(In reply to Chris Karlof [:ckarlof] from comment #1)
> This inconsistency rears its head in Sync errors as well.

FWIW, that's bug 995134 (but it's not a dupe)
(In reply to Mark Hammond [:markh] from comment #2)
> FWIW, that's bug 995134 (but it's not a dupe)

Actually, it might be - not clear without looking deeper!
> Actually, it might be - not clear without looking deeper!

True, unclear, but Hawk is used for requests to the Sync storage backend too.
Priority: -- → P5
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.