Status and Error Codes

REST API operations for Service Fabric return standard HTTP status codes, as defined in the HTTP/1.1 Status Code Definitions.

API operations may also return additional error information that is defined by Service Fabric. This additional error information is returned in the response body. The body of the error response is of FabricError schema as shown below:


{
    "Error": {
        "Code": "string-errorcode",
        "Message": "string-message"
    }
}

For example, trying to get services of an unknown Service Fabric application would result in the response in the body with HTTP 404 status code. The response indicates that the specified application was not found in the cluster.

Request

http:/localhost:19080/Applications/UnknownApp/$/GetServices?api-version=6.0

Response


{
    "Error": {
        "Code": "FABRIC_E_APPLICATION_NOT_FOUND",
        "Message": "Application not found"
    }
}