Skip to content
Back to Steward

Error Handling

The Steward API uses standard HTTP status codes and returns structured error responses.

CodeMeaning
200Success
201Created
400Bad Request - invalid parameters or request body
401Unauthorized - missing or invalid API key
403Forbidden - valid key but insufficient permissions
404Not Found - resource doesn’t exist or doesn’t belong to your account
500Internal Server Error

Validation failures return 400, not 422.

Error responses include a message field describing the issue:

{
"statusCode": 400,
"message": "Only pending applications can be submitted",
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Invalid API key"
}

Verify your API key is correct and active. Keys that have been revoked will return this error.

{
"statusCode": 404,
"message": "Application not found"
}

The resource either doesn’t exist or doesn’t belong to your account. The API will not reveal whether a resource exists in another account.

{
"statusCode": 400,
"message": ["email must be an email", "firstName should not be empty"],
"error": "Bad Request"
}

The message field may be an array when multiple validation errors occur.

Cursor tokens are tied to the sort direction and field they were issued under. Reusing a cursor under a different order or orderBy is rejected with 400:

MessageCause
Invalid pagination cursorThe token is malformed or wasn’t issued by this API.
Pagination cursor direction does not match sort orderYou changed order mid-pagination. Drop the cursor and start over.
Pagination cursor sort field does not match requested orderByYou changed orderBy mid-pagination. Drop the cursor and start over.

See the Pagination guide for the cursor lifecycle.

Tip: Always check the HTTP status code first, then read the message field for details. Build your error handling to gracefully handle both string and array message values.