This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
Standardize error codes #2901
Labels
awesome endeavour
exp/expert
Having worked on the specific codebase is important
kind/enhancement
A net-new feature or improvement to an existing feature
kind/maybe-in-helia
It's fairly standard practice to assign error codes of some sort to the exceptions in order to be less dependent on parsing the text of the error messages. Example:
This means that the error message is effectively part of the API and changing it will break compatibility, which we probably don't want.
Also, since we have a standard API across implementations in the same language (js-ipfs, js-ipfs-api) we can write new modules that allow the API implementation to be passed in. But, if part of that API does some error checking we would need the messages to be 100% consistent or have a standardized error code across them.
The text was updated successfully, but these errors were encountered: