Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Spec refining: listing down the possible errors to be handled #11

Closed
nicola opened this issue Aug 4, 2016 · 4 comments
Closed

Spec refining: listing down the possible errors to be handled #11

nicola opened this issue Aug 4, 2016 · 4 comments
Labels
status/deferred Conscious decision to pause or backlog

Comments

@nicola
Copy link
Member

nicola commented Aug 4, 2016

Although we should do like many other similar specifications:

This specification does not define how errors are handled. An application SHOULD specify the impact and handling of each type of error (json pointers)

The spec should list out the different possible errors spec implementors and application developers will need to take into account. Let's keep this issue to list down all the possible erros. I am listing a few:

  • CID has bad syntax (?)
  • hash function not known (and all the others inherited from the multihash spec)
  • Path referencing to non existent value
@dignifiedquire
Copy link
Member

There should also be errors for

  • invalid binary representation (for example if it gets corrupted)
  • for CID
    • invalid or unknown multibase
    • invalid version
    • invalid or unknown multicodec

@jbenet
Copy link
Contributor

jbenet commented Aug 6, 2016

  • Some of these errors should be "grouped" under a general "invalid or malformed link". the more specific error can be given, but it will be useful (for everyone's sanity) to keep the error types down.
  • if we do end up with different error types (beyond malformed stuff) we should consider defining int error codes, so implementations can agree.
  • it is always a temptation (once you do that) to define a bunch of different errors (after all, you have all this int space, right?) but experience teaches that having super granular errors sometimes hurts more than having coarser errors. (ballooning complexity)

@nicola
Copy link
Member Author

nicola commented Aug 7, 2016

@jbenet I was event thinking of just:

This specification does not define how errors are handled. An application SHOULD specify the impact and handling of each type of error (json pointers)

If we want we can do a separate parser spec - not sure how much we want to standardize this (this is what JSON-pointers, JSON-ld & some others have done - we should look at cbor or xpath)

@daviddias daviddias added the status/deferred Conscious decision to pause or backlog label Mar 19, 2018
@rvagg
Copy link
Member

rvagg commented Aug 14, 2019

Closing due to staleness as per team agreement to clean up the issue tracker a bit (ipld/team-mgmt#28). This doesn't mean this issue is off the table entirely, it's just not on the current active stack but may be revisited in the near future. If you feel there is something pertinent here, please speak up, reopen, or open a new issue. [/boilerplate]

@rvagg rvagg closed this as completed Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

5 participants