-
Notifications
You must be signed in to change notification settings - Fork 853
Export error codes in lib #21622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ArangoDB generates a JS version of that DAT file already: https://github.com/arangodb/arangodb/blob/devel/js/common/bootstrap/errors.js This is out of scope for arangojs as the error codes can change in new versions of ArangoDB but there may be a way to get these from another npm module in the near future. |
Why does this specifically apply to error codes? How are they any different from other parts of the API?
If there is too much fuctuation in error code meanings for even arangojs to have a mapping, I wonder how I could possibly write an application or a library that supports multiple ArangoDB versions. I hope the error codes don't just arbitrarily change without announcement. I'm fine with this not being implemented, just thought I could get rid of the definition file in our open-source library, but I don't quite understand how it would not fit into arangojs. |
I think a case could be made for publishing the error codes separately on npm. I'll raise this for internal discussion. |
added generators: |
It would be nice if there was a public (non-"lib") file with constants for all of ArangoDB's error codes, to use them in your own error handling
Could just take this definition file and do a regex replacement into typescript. I did that once for our cruddl lib
The text was updated successfully, but these errors were encountered: