Skip to content

Error structure format #117

Open
Open
@iuricmp

Description

@iuricmp

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)"
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions