Closed Bug 1560513 Opened 5 years ago Closed 5 years ago

Handle errors properly in about:certificate

Categories

(Firefox :: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: carolina.jimenez.g, Assigned: carolina.jimenez.g, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In AboutCertViewerHandler we can send an error message if something is wrong and we cannot send the certificate to about:certificate, this could be done with something like this:

aMessage.target.sendAsyncMessage("Error", {
  err: "There was an error",
});

And in the page, we can receive the error doing:

document.addEventListener("DOMContentLoaded", (e) => {
    RPMAddMessageListener("Error", showError);
});

function showError(message) {
  console.log("error ", message.data.err);
}

We need to handle all possible errors and show it in another way rather than console logging to the user.

Blocks: cert-viewer
Assignee: nobody → carolina.jimenez.g

This will probably need some coordination with Danielle to make sure we show some kind of UI to the user.

Status: NEW → ASSIGNED
Priority: -- → P2

Maybe you can file a bug about creating the UI for errors? That way I can add here that bug blocking this one

Thanks

Flags: needinfo?(danielleleb12)
Depends on: 1561118

For the UI for errors, I'm currently creating a component that would conditionally render if there was an error.
That component would take up the full browser window, and would display an error message and image.

Should specific information about the error be displayed, or just a general 'error' message?

The call to create it could come from the "DOMContentLoaded" event listener in certviewer.js based on the response from RPMSendAsyncMessage("getCertificate"); (if I'm understanding that function correctly).

Flags: needinfo?(danielleleb12)

(In reply to danielleleb12 from comment #3)

Should specific information about the error be displayed, or just a general 'error' message?

I'm not sure yet, maybe we should ask Johann, but for the moment it could be a general error message, in my opinion.

Blocks: 1566129
Blocks: 1566797
Attachment #9078203 - Attachment description: Bug 1560513 - Handles errors in about:certificate.r=johannh → Bug 1560513 - Handles errors in about:certificate.r=keeler
Keywords: checkin-needed

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/014889dc7434
Handles errors in about:certificate.r=keeler

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Regressions: 1567161
Status: RESOLVED → REOPENED
Flags: needinfo?(carolina.jimenez.g)
Resolution: FIXED → ---
Target Milestone: Firefox 70 → ---
Flags: needinfo?(carolina.jimenez.g)
Keywords: checkin-needed

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b073b95fcf61
Handles errors in about:certificate.r=keeler

Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: