Skip to content
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

Error structure format #117

Open
iuricmp opened this issue Feb 16, 2024 · 2 comments
Open

Error structure format #117

iuricmp opened this issue Feb 16, 2024 · 2 comments
Labels
question Further information is requested

Comments

@iuricmp
Copy link
Contributor

iuricmp commented Feb 16, 2024

As a developer, I'd like a better Error structure from the GnoNative library.

For example, when I have to deal with an Error (eg: ErrUnknownAddress) thrown by GnoNative and I have to convert it to JSON, I get:

{"name": "ConnectError", "rawMessage": "ErrUnknownAddress(#206)", "code":2, "metadata":{"map":{}}, "details":[]}

It would be great if we had a better structure, eg:

{
  "type": "ErrUnknownAddress",
  "code": "206",
  "message": "The address provided is unknown on the blockchain.",
  "documentation_url" : "[https://gno.land/api/docs/errors/ERR-206](https://gno.land/api/docs/errors/ERR-206)"
 }
@jefft0 jefft0 added the question Further information is requested label Feb 23, 2024
@jefft0
Copy link
Contributor

jefft0 commented Mar 8, 2024

There is already a JavaScript error data structure. @D4ryl00 and @iuricmp to coordinate to try it.

@jefft0
Copy link
Contributor

jefft0 commented Mar 15, 2024

Wait for the PR for MsgCall to return JSON results and see if the panic response also has helpful JSON.

@jefft0 jefft0 added the more info needed Waiting for a response label Mar 15, 2024
@jefft0 jefft0 removed the more info needed Waiting for a response label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants