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.