Table of Contents

Sparse spatial map APIs error code description

Response format

All API responses use a unified JSON format. The following is an example:

{

  "statusCode": 119,

  "msg": "Parameter has errors",

  "date": "2022-06-15T09:56:30.000Z",

  "result":  //statusCode 为 0 的情况才有 result,如果发生错误,结果字段为空

}
Field Type Description
statusCode integer Business status code. 0 indicates success, and non-0 indicates an error
msg string Message
result object Returned content. When the status code is 0, it responds with the target image object structure; otherwise it is empty
date string Server time
Important

result includes response content only when statusCode == 0. In other states, result is empty
When statusCode != 0, pay attention to the error message msg

Error code categories

HTTP status code description

HTTP status code Description
200 Request succeeded (may contain business errors)
400 Request parameter error
401 APIKey authentication failed
403 Insufficient permission or resource access prohibited
404 Request URL API Path does not exist
500 Internal server error
502 Application exception captured, possibly data error

Note: Business errors are usually returned through an HTTP 200 response, and the specific error type is identified in the statusCode field.

Business status code list

Status Code Message
0 Success
101 Uploaded file is empty
102 File size is too large
106 Missing parameter or parameter is empty
110 Call server API errors
111 Resource not found
401 Authentication token expired
401 Authentication parameter is missing
401 Unknown appId or appKey
401 Account is locked
401 Authentication failed, invalid signature or token

Common error scenarios

Timeout with no response

  • Request Timeout: The network is slow. It is recommended to check the client's network environment
  • Http 401 Unauthorized: APIKey authentication failed. Check whether appId/appKey is correct
  • Status code 401: The application key is invalid or the application does not exist. Check the application configuration

Parameter errors

  • 400 Bad Request: Request parameter format error

Resource operation errors

  • Status code 10x: The queried target resource does not exist, or the parameters are wrong

System errors

  • Http 50x Internal Server Error: Internal server exception or application exception captured. It is recommended to test on the website or with a sample

Best practice recommendations

  1. Client handling: It is recommended to determine whether the business operation succeeds according to the statusCode field, instead of relying only on the HTTP status code
  2. Error retry: Retry 5xx errors as appropriate. For 4xx errors, check request parameters
  3. Logging: It is recommended to record the complete error response to facilitate troubleshooting
  4. Timeout handling: Set a reasonable request timeout to avoid waiting for a long time