1. 主页
  2. 文档
  3. Mega API Document
  4. Agreement
  5. Error Definition

Error Definition

Normal response 

{
    "id": "2342msn",
    "result": {
        "success": true,
        "userId": 10,
        "nickname": "demo",
        "regType": 1
    },
    "error": null,
    "jsonrpc": "2.0"
} 

When the interface returns successfully, the error parameter is null

        Error response occurs

{
    "id": "2342msn ",
    "error": {
        "code": "2206",
        "sn": "demo",
        "message": "登录名(loginId)已存在,注册用户失败",
        "reason": "xxx",
        "action": null
    },
    "detail": {
        "cxt": "/user-api",
        "method": "open.mega.user.create",
        "elapsed": 4,
        "result": null
    }
    "jsonrpc": "2.0",
}

When the current port call returns an exception, the error parameter contains the specific error code and error information

我们要如何帮助您?