EOAP Problem Details Registry
This registry acts as a well-known location for problem detail types returned by various EOAP APIs. It acts as a central registry to promote reuse and clarity of problem detail types conforming to RFC 9457, formerly RFC 7807.
EOAP Problem Types
| Problem type | Description |
|---|---|
| Already Exists | The request attempted to create a resource that already exists. |
| Missing Body Property | The request is missing an expected body property. |
| Missing Request Header | The request lacked an expected header. |
| Missing Request Parameter | The request is missing a query or path parameter. |
| Invalid Body Property Format | One or more of the body properties was malformed. |
| Invalid Request Parameter Format | One or more of the query or path parameters was malformed. |
| Invalid Request Header Format | One or more of the request headers was malformed. |
| Invalid Body Property Value | One or more of the body property values are invalid. |
| Invalid Request Parameter Value | One or more of the query or path parameter values are invalid. |
| Invalid State Transition | The requested transition is not valid for the current item status. |
| Validation Error | The request is invalid and deemed unprocessable. |
| Business Rule Violation | The request is deemed invalid as it failed business rule checks. |
| License Expired | The client license has expired, rendering the service unavailable. |
| License Cancelled | The client license has been cancelled, rendering the service unavailable. |
Common Problem Types
The following types can also be leveraged for convenience; however, the recommendation is to utilize the IANA registry for generic/common types.
| Problem type | Description |
|---|---|
| Bad Request | The client request is invalid or malformed. |
| Forbidden | The request is not authorized for the resource. |
| Invalid Parameters | One or more of the parameters was malformed. |
| Not Found | The requested resource could not be found. |
| Service Unavailable | The requested service is currently unavailable. |
| Server Error | The server encountered an unexpected error. |
| Unauthorized | The client request missed or malformed its credentials. |
When necessary, a Problem Detail response MAY include additional detail on the problems that have occurred. The additional errors MUST be under the errors collection, which itself follows the JSON Schema defined in our GitHub repo.
Python Usage
Install the package in an environment with Pydantic 2:
pip install eoap-problems-registry
Use the generated models to build responses with fixed registry fields and optional extension members:
import eoap_problems_registry as registry
problem = registry.MissingRequestParameter(
instance="https://api.example.test/problems/abc123",
code="400-03",
errors=[
registry.ErrorDetail(
detail="The query parameter limit is required.",
parameter="limit",
)
],
correlation_id="req-123",
)
payload = problem.model_dump(mode="json", exclude_none=True)
The resulting payload includes the registered type, status, title, and detail values:
{
"instance": "https://api.example.test/problems/abc123",
"code": "400-03",
"errors": [
{
"detail": "The query parameter limit is required.",
"parameter": "limit"
}
],
"type": "https://eoap.github.io/problems-registry/missing-request-parameter",
"status": 400,
"title": "Missing request parameter",
"detail": "The request is missing an expected query or path parameter.",
"correlation_id": "req-123"
}
ProblemDetails and ErrorDetail allow additional provider-specific fields, while generated problem classes use Pydantic literal fields to protect the registered type, status, title, and detail values.