Closed
Bug 511746
Opened 15 years ago
Closed 15 years ago
Resource.foo shouldn't throw except in exceptional cases.
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
0.6
People
(Reporter: mconnor, Assigned: Mardak)
References
Details
Attachments
(1 file, 2 obsolete files)
27.81 KB,
patch
|
hello
:
review+
|
Details | Diff | Splinter Review |
Resource.get() throws on 4xx errors. This seems wrong, and means we have to catch exceptions to handle network errors, and then propagate upwards to the original caller. We should only throw if something generally unexpected happens. Auth failures on login almost certainly shouldn't be unexpected as a valid case to handle.
Assignee | ||
Comment 1•15 years ago
|
||
Also remove usages of lastChannel, etc.
Assignee | ||
Comment 2•15 years ago
|
||
No more getting down and dirty bit. It's possible that responses are handled by cache, so there'll be data but no headers, so just use some defaults in that case.
Attachment #396689 -
Attachment is obsolete: true
Attachment #396689 -
Flags: review?(thunder)
Assignee | ||
Updated•15 years ago
|
Attachment #396784 -
Flags: review?(thunder)
Assignee | ||
Comment 3•15 years ago
|
||
Updated engines to check for failure and throw.
Attachment #396784 -
Attachment is obsolete: true
Attachment #396850 -
Flags: review?(thunder)
Attachment #396784 -
Flags: review?(thunder)
Comment 4•15 years ago
|
||
Comment on attachment 396850 [details] [diff] [review] v1.2 r=thunder I love the string hack ;)
Attachment #396850 -
Flags: review?(thunder) → review+
Assignee | ||
Comment 5•15 years ago
|
||
http://hg.mozilla.org/labs/weave/rev/bf3db89a4cbd Get rid of lastChannel and return a String object from _request with additional properties of status, succeeded, headers -- even if the response was handled by cache. Update engines to check for non-success and throw the failure. Update tests to use these additional properties instead of lastChannel, etc.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.6
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•