aecreations / clippings

Clippings: an extension for Mozilla Firefox
20 stars 4 forks source link

Handle error when unable to retrieve sync data #449

Closed aecreations closed 1 week ago

aecreations commented 7 months ago

Clippings currently doesn't report an error when it is unable to read the sync data from the sync file. For example, on macOS, an error would occur if Sync Clippings Helper doesn't have full disk access (Python error: [Errno 1] Operation not permitted: <full path to file>).

These errors are now exposed by Sync Clippings Helper as of version 2.0, via the new native message "get-compressed-synced-clippings". When this happens, the response will be in the following structure:

{
  "status": "failure"
  "details": "<Python error>: <The exception details from Python>"
}

For the above macOS example, the details would be: PermissionError: [Errno 1] Operation not permitted.

See related issue: aecreations/sync-clippings#20.

aecreations commented 7 months ago

When such an error occurs, display a notification with the following message:

Clippings Sync Clippings Helper is unable to read the sync file.

aecreations commented 4 months ago

This error handling was added as part of issue #434.