Closed Bug 1904949 Opened 3 months ago Closed 3 months ago

Add `cause` codes to exceptions that we expect to map to errors shown to the user

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: mconley, Assigned: sthompson)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-device-migration])

Attachments

(1 file)

We have a whole bunch of exceptions that can get thrown in the BackupService and related components. Some of those result in errors that need to be shown to users.

What I think we should do is to have a cause get supplied for every error we expect to be shown to users. The value of the cause should be a numeric constant defined in ArchiveUtils.

Then, if and when we need to show an exception to a user, we can hopefully map from the cause constant to the appropriate localized string for the context.

Filed as a meta, because I figure we'll probably do this piecemeal.

Depends on: 1904950
Depends on: 1905157

This introduces error code causes that can be used by UI components to present context-relevant error text. This starts throwing errors with cause error codes in parts of the backup codebase, but there are still areas (especially at the boundary with web workers) where cause codes need to be introduced and handled.

Assignee: nobody → sthompson
Status: NEW → ASSIGNED
See Also: → 1906169
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a48d151dddff Add cause error codes to backup service r=backup-reviewers,mconley
Keywords: meta
Summary: [meta] Add `cause` codes to exceptions that we expect to map to errors shown to the user → Add `cause` codes to exceptions that we expect to map to errors shown to the user
Whiteboard: [fidefe-device-migration]
Duplicate of this bug: 1904950
No longer depends on: 1905157
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Duplicate of this bug: 1901530
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: