Errors
This page covers a list of all errors you might encounter using the Lattice SDK.
Our Tasks and Entities APIs can return errors depending on request parameters and system states. All errors returned by our REST endpoints conform with HTTP status code semantics, and include a descriptive response body and status code for debugging. Errors from our gRPC SDKs conform with standard gRPC status codes, and also provide a descriptive error body.
Service errors always provide descriptive information about the issue. For instance, an HTTP request to retrieve a non-existent task returns details explaining the invalid request. In such a case, an HTTP client receives a 404 status code with the error below:
{
"code": "NOT_FOUND_ERROR",
"message": "task not found: task-id-123"
}
Service errors are consistently descriptive across both REST and gRPC interfaces. For the above error, a gRPC client receives a comparable error:
rpc error: code = NotFound desc = task not found: task-id-123
HTTP Errors
When using the Lattice SDK for HTTP, you might encounter the following general errors. Each individual error also provides specific details relevant to the issue:
Error Code | HTTP Status Code | Description | Example |
---|---|---|---|
NOT_FOUND_ERROR | 404 | The resource requested does not exist. | Requesting to get a task id for a task that was never created. |
UNMARSHAL_ERROR | 400 | The request data format or details is incorrect, or could not be interpreted or parsed. | Submitting malformed JSON data in the request body. |
VALIDATION_ERROR | 400 | The request parameters did not pass validation for a given API. | Providing an invalid task ID that doesn't meet the expected format. |
AUTHORIZATION_ERROR | 401 | The requester is not authorized to perform the action. | Attempting to override entity details without proper permissions for a user. |
SESSION_TIMEOUT | 408 | The session has expired and requires re-authentication. | A user's long-polling session to retrieve entity events has been open too long without any new events. |
INTERNAL_ERROR | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | An unexpected error occurred within the server. Contact an Anduril representative. |
gRPC Errors
Lattice APIs return the following general error codes when interacting via gRPC, accompanied by additional information specific to the error encountered:
Error Code | Description |
---|---|
NotFound | The request resource was not found or does not exist. |
InvalidArgument | The client specified an invalid argument or request parameter. |
Internal | An internal error occurred within the service. Contact an Anduril representative for help. |
PermissionDenied | The client does not have permission to execute the requested operation. |
Unauthenticated | The request does not have valid authentication credentials for the operation. |
Unavailable | The service is currently unavailable. This is most likely a transient condition. If this persists, contact an Anduril representative. |
FailedPrecondition | The operation was rejected because the system is not in a state required for the operation's execution. |