Status codes

Updated at:

The following tables list the status codes for edge APIs.

HTTP status codeError code (Code)Description
200 OKNoneThe API call was successful.
201 CreatedNoneThe request was successful and the server created a new resource.
400 Bad RequestBadRequestThe request has incorrect semantics. The server cannot understand the request. Do not resubmit the request without modifying it.

For more information, see the Detailed error messages for the 400 Bad Request status code table below.

401 UnauthorizedUnauthorizedThe identity authentication cookie for the target resource is incorrect. Call the CreateAuthCookie API operation again to update the cookie. Otherwise, you cannot call other API operations.
403 ForbiddenForbiddenThe server understands the request but refuses to execute it. Verify that the current user has permission to call the API operation.
404 Not FoundNotFoundThe request failed. The requested resource was not found on the server. Confirm that the request parameters are correct.
405 Method Not AllowedMethodNotAllowedThe request method specified in the request line cannot be used for the requested resource. For example, the POST method is not supported.
500 Internal Server ErrorInternalServerErrorAn internal server error occurred.

For more information, see the Detailed error messages for the 500 Internal Server Error status code table below.

Note If a 500 Internal Server Error occurs, check the error message and log content first to troubleshoot the issue.
503 Service UnavailableServiceUnavailable

The server cannot handle the request due to temporary server maintenance or overload.

Table 1. Detailed error messages for the 400 Bad Request status code
Error code (Code)Description
InvalidParameterA request parameter is invalid. Enter the correct request parameters and retry.
MissingParameterA required request parameter is missing. Enter the correct request parameters and retry.
Table 2. Detailed error messages for the 500 Internal Server Error status code
Error code (Code)Description
Cookie.Handler.CreateFailed to create the identity authentication cookie.
Cookie.SetFailed to save the identity authentication cookie.
HMACThe Hash-based Message Authentication Code (HMAC) operation for the authentication message failed.
Connection.CreateFailed to establish a connection with the upstream service.
Connection.LostThe connection to the upstream service is lost.
Message.CreateFailed to create the message to be sent to the upstream service.
Message.SendAndReplyAn error occurred when sending a message to or receiving a message from the upstream service.
Message.InvalidReplyThe format of the response from the upstream service is incorrect.
Message.FailedReplyThe response from the upstream service indicates that the API call failed.

This error code is returned if the error code (Code) from the upstream service is not in the list of errors that use the Service.{name}.{error} format.

Service.NotExistThe upstream service does not exist. This error code is typically reported when the upstream service is not started or has exited.
Service.Data.GetFailed to get data from the data center.
Service.Data.SetFailed to set data in the data center.
Service.Data.KeyNotExistFailed to get data from the data center because the data key does not exist.
Service.Thing.CallFailed to call the device API operation. For more information, see Device access status codes.
Service.Function.NotExistThe called function does not exist.
Service.Function.TimeoutThe function execution timed out.
Service.Scene.NotExistThe scene rule does not exist.
Service.Scene.NotAtLevel0The operation is denied because the scene orchestration is not in Normal mode. For example, it is in Sceneless mode. Change the mode to Normal and retry.