Technical Documentation · Version 1.0
This document defines the complete error handling model for the MyOpsAgent platform. It explains how errors are structured, what each error code means, and what operational guarantees customers can rely on when integrating with the MyOpsAgent API.
Clear, predictable error handling is essential for building reliable integrations. Whether you are a small business connecting a simple workflow or a large enterprise integrating MyOpsAgent into mission‑critical systems, this document ensures you understand exactly how the platform behaves under all conditions.
All errors returned by the MyOpsAgent API follow a consistent, structured JSON format. This ensures that client systems can reliably parse, log, and react to errors.
{
"status": "error",
"error_code": "INVALID_INPUT",
"message": "Description of the error",
"correlation_id": "abc123",
"duration_ms": 0.7
}
| Field | Description |
|---|---|
status |
Always "error" for failed requests. |
error_code |
A machine‑readable code describing the error category. |
message |
A human‑readable explanation of what went wrong. |
correlation_id |
A unique identifier for tracing the request through logs. |
duration_ms |
Time taken to process the request before failure. |
The correlation_id is especially important for debugging and audit purposes. Customers
should log it for every error.
Below is the complete list of error codes returned by the MyOpsAgent platform. Each code includes a detailed explanation and examples of when it may occur.
Description: The request body was malformed, missing required fields, or contained invalid data types.
Typical Causes:
work_item or resources"message": "Invalid JSON payload"
Description: The request did not include a valid API key or used a revoked key.
Typical Causes:
X-API-Key header"message": "Unauthorized: invalid or inactive API key"
Description: The organisation exceeded the allowed number of requests per minute.
Typical Causes:
"message": "Rate limit exceeded"
Description: The organisation exceeded its daily or monthly usage cap.
This is a hard stop to protect system stability and enforce billing limits.
Typical Causes:
"message": "Hard usage limit exceeded"
Description: The requested resource does not exist.
Typical Causes:
"message": "Route not found"
Description: An unexpected server error occurred.
This error indicates that the request was valid, but something failed internally.
Typical Causes:
"message": "Internal server error"
MyOpsAgent is designed to provide predictable, stable, and auditable behaviour under all conditions. The following guarantees apply to every request.
Every API response — success or failure — includes a correlation_id.
This allows:
Every call to /decide is recorded in the audit log, including:
Given the same inputs, the engine will always produce the same output. There is no randomness in the decision engine.
This is essential for:
Each organisation is fully isolated:
No customer can ever access another customer’s data.
Even when errors occur, MyOpsAgent guarantees:
MyOpsAgent enforces:
The /health endpoint provides:
This document defines the complete error handling and operational behaviour of the MyOpsAgent platform. By following these standards, customers can build robust, reliable integrations that behave predictably under all conditions.
The combination of structured error codes, deterministic decisioning, multi‑tenant isolation, and audit logging ensures that MyOpsAgent meets the needs of both small businesses and enterprise‑scale operations.