Closed
Bug 1572395
Opened 5 years ago
Closed 5 years ago
fetchhttp.js deals with connection errors incorrectly
Categories
(Thunderbird :: Account Manager, defect)
Thunderbird
Account Manager
Tracking
(thunderbird_esr6869+ fixed, thunderbird69 wontfix, thunderbird70 fixed)
RESOLVED
FIXED
Thunderbird 70.0
People
(Reporter: neil, Assigned: neil)
Details
Attachments
(1 file, 2 obsolete files)
1.20 KB,
patch
|
neil
:
review+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
Relevant comment from fetchhttp.js
:
// If we can't resolve the hostname in DNS etc., .statusText throws
While this was correct at the time (10 years ago), bug 608939 changed the behaviour, so this code hasn't been working for over 8 years.
Assignee | ||
Comment 1•5 years ago
|
||
Actually, status
might have still thrown as late as 7 years ago; that was changed in bug 301705.
Assignee: nobody → neil
Attachment #9083964 -
Flags: review?(ben.bucksch)
Comment 2•5 years ago
|
||
Comment on attachment 9083964 [details] [diff] [review] Proposed patch Review of attachment 9083964 [details] [diff] [review]: ----------------------------------------------------------------- Great idea, but please keep the try/catch, just in case (!). In the catch, do `console.error(ex)`, then continue with the `if (!errorMsg)` check as if there was no exception: ``` try { errorCode = this._request.status; errorStr = this._request.statusText; } catch (ex) { console.error(ex); // continue with empty errorStr } if (!errorStr) { // If we can't resolve the hostname in DNS etc., .statusText is empty ``` ::: mail/components/accountcreation/content/fetchhttp.js @@ -246,5 @@ > - try { > - errorCode = this._request.status; > - errorStr = this._request.statusText; > - } catch (e) { > - // If we can't resolve the hostname in DNS etc., .statusText throws Please keep the comment, it's highly useful and important. Just adapt it.
Attachment #9083964 -
Flags: review?(ben.bucksch) → review-
Updated•5 years ago
|
Attachment #9083964 -
Flags: feedback+
Assignee | ||
Comment 3•5 years ago
|
||
Attachment #9083964 -
Attachment is obsolete: true
Attachment #9084026 -
Flags: review?(ben.bucksch)
Comment 4•5 years ago
•
|
||
Comment on attachment 9084026 [details] [diff] [review] Addressed review comments Like I said above, keep the old comment, it's useful and important to know which case we are handling, because it's not clear from the code and these errors are happening in reality. Please do it like this: ``` } catch (e) { // In case .statusText throws (it's marked as [Throws] in the webidl), // continue with empty errorStr. console.error(e); } if (!errorStr) { // If we can't resolve the hostname in DNS etc., .statusText is empty. errorCode = -2; ``` r=BenB with this change
Attachment #9084026 -
Flags: review?(ben.bucksch)
Attachment #9084026 -
Flags: review-
Attachment #9084026 -
Flags: feedback+
Assignee | ||
Comment 5•5 years ago
|
||
Ah, so I needed to keep the comment in both places, effectively. Sorry for not realising that.
Attachment #9084026 -
Attachment is obsolete: true
Attachment #9087683 -
Flags: review+
Assignee | ||
Updated•5 years ago
|
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1e07285df111
Update to current statusText semantics. r=BenB
Updated•5 years ago
|
Target Milestone: --- → Thunderbird 70.0
Comment 7•5 years ago
|
||
Comment on attachment 9087683 [details] [diff] [review] Addressed review comments [Approval Request Comment] Regression caused by (bug #): User impact if declined: If we have a wrong hostname (likely, in the setup dialog), user doesn't get a proper error message. Testing completed (on c-c, etc.): Risk to taking this patch (and alternatives if risky):
Attachment #9087683 -
Flags: approval-comm-esr68?
Comment 8•5 years ago
|
||
Comment on attachment 9087683 [details] [diff] [review] Addressed review comments Sigh. I wish you'd finally acknowledge how releases work. Trunk first, then beta, then ESR. Sadly you didn't ask for beta approval, so the beta 69 ship has sailed, so technically this can only go into TB 68.2 in late October.
Attachment #9087683 -
Flags: approval-comm-esr68? → approval-comm-esr68+
Comment 9•5 years ago
|
||
Comment on attachment 9087683 [details] [diff] [review] Addressed review comments [Approval Request Comment] Regression caused by (bug #): User impact if declined: Testing completed (on c-c, etc.): Risk to taking this patch (and alternatives if risky):
Attachment #9087683 -
Flags: approval-comm-beta?
Comment 10•5 years ago
|
||
Too late. It is in TB 70 and will go to TB 70 beta next week. I'll cancel all pending requests or approvals then.
Comment 11•5 years ago
|
||
TB 68.1 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/437beb41ea65f7906aea0d4a10f9cc5b8f297ba3
status-thunderbird69:
--- → wontfix
status-thunderbird70:
--- → fixed
status-thunderbird_esr68:
--- → fixed
tracking-thunderbird_esr68:
--- → 69+
Comment 12•5 years ago
|
||
Comment on attachment 9087683 [details] [diff] [review] Addressed review comments Sorry, too late, will go into TB 70 beta.
Attachment #9087683 -
Flags: approval-comm-beta?
You need to log in
before you can comment on or make changes to this bug.
Description
•