PrompticPromptic

Error Handling

The API uses standard HTTP status codes and returns errors as JSON.

Error Format

{
  "error": "Description of what went wrong"
}

Status Codes

CodeMeaning
400Bad request - invalid input or missing required fields
401Unauthorized - invalid or missing API key
404Not found - resource does not exist
409Conflict - resource is in an incompatible state (e.g., starting a non-pending experiment)
413Payload too large - request body exceeds size limit
415Unsupported media type - invalid content type
500Internal server error

Validation Errors

When request body validation fails, the error message describes the first validation issue:

{
  "error": "Expected string, received number"
}

Common Errors

Missing required field:

{ "error": "Required" }

Invalid UUID:

{ "error": "Invalid uuid" }

State conflict:

{ "error": "Can only update pending experiments" }

See the full API Reference for endpoint-specific error details.