Skip to content

[Feature] Frontend: error code unfied and toast message #1351

@robocanic

Description

@robocanic

What would you like to be added:

Unified the error codes of backend api response. Toast message by "${code}:${message}".

Why is this needed:
Unified the error codes is useful when we encounter some problems. The error response structure is like below:

{
    "code":  "UnknownError",
    "message": "mesh of name `test` is not found",
}

And the success response is below:

{
    "code":  "Success",
    "message": "string",
    "data": {
        "operatorLog": true
    }
}

Frontend devs need to concat the code and message and toast it in case we can find the problem earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions