Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Improve error categorization and cross-platform reporting #64

Closed
sashei opened this issue Dec 14, 2017 · 3 comments
Closed

Improve error categorization and cross-platform reporting #64

sashei opened this issue Dec 14, 2017 · 3 comments
Assignees
Milestone

Comments

@sashei
Copy link
Contributor

sashei commented Dec 14, 2017

In service to sync, the categories of errors (i.e., reasons) needs to be expanded to account for the various condition that can occur. Additionally, the reasons need to be represented in a manner that is understandable to machines and developers across process and platform boundaries.

The additional errors to be handled are covered in sync.

The machine-actionable "reason" is enumerated and reported via a JavaScript Symbol. However, this has some drawbacks:

  • Symbols do not have a JSON representation
  • Symbols do not have a structured clone representation

The above means a Symbol gets lost whenever the error crosses a process boundary, either as a structured clone or JSON stringification.

For the widest compatibility, the reason property of DataStoreError should be a String instead of a Symbol. Additionally, for improved diagnostic purposes, this reason string should be conveyed in the error message.

Related

@linuxwolf
Copy link
Contributor

There should be a well-known separator between the error identifier/category and the rest of the message. Is : ok?

LOCKED: the datastore is locked

@ghost ghost assigned linuxwolf Dec 20, 2017
@ghost ghost added the in progress We are actively working on it. label Dec 20, 2017
@sandysage sandysage removed the in progress We are actively working on it. label Jan 4, 2018
@linuxwolf linuxwolf changed the title Adhere to convention with error messages Reasons as Strings instead of Symbols Jan 8, 2018
@linuxwolf
Copy link
Contributor

@mozilla-lockbox/engineering Updated the issue description to reflect the consensus.

@sandysage sandysage added backlog We have looked at and understand the issue. Prioritized with alignment to product initiatives. and removed backlog We have looked at and understand the issue. Prioritized with alignment to product initiatives. labels Jan 11, 2018
@linuxwolf
Copy link
Contributor

mistakenly closed via #71.

@linuxwolf linuxwolf reopened this Jan 16, 2018
@linuxwolf linuxwolf changed the title Reasons as Strings instead of Symbols Improve error categorization and cross-platform reporting Jan 24, 2018
@linuxwolf linuxwolf added the backlog We have looked at and understand the issue. Prioritized with alignment to product initiatives. label Feb 5, 2018
@linuxwolf linuxwolf removed their assignment Feb 5, 2018
@sandysage sandysage added to do and removed backlog We have looked at and understand the issue. Prioritized with alignment to product initiatives. labels Feb 8, 2018
@sandysage sandysage added this to the 0.1.7 milestone Feb 9, 2018
@linuxwolf linuxwolf added in progress We are actively working on it. and removed to do labels Feb 12, 2018
@m8ttyB m8ttyB added the no-pi label Feb 12, 2018
@ghost ghost removed the in progress We are actively working on it. label Feb 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants