Description
Create a guide documenting the standard error response format for Nerva APIs, based on RFC 9457 (Problem Details for HTTP APIs). The pipeline config defines an error envelope, but there's no guide showing how to implement consistent error responses.
Why
Inconsistent error formats are a top complaint from API consumers. A standard format with a dedicated guide ensures every endpoint returns errors in the same shape — making it easier for clients to parse and display errors.
Current State
`pipeline.config.json` defines the envelope:
```json
"envelope": {
"dataField": "data",
"metaField": "meta",
"errorField": "error"
}
```
But no guide explains how to structure error responses within this envelope.
Acceptance Criteria
Description
Create a guide documenting the standard error response format for Nerva APIs, based on RFC 9457 (Problem Details for HTTP APIs). The pipeline config defines an error envelope, but there's no guide showing how to implement consistent error responses.
Why
Inconsistent error formats are a top complaint from API consumers. A standard format with a dedicated guide ensures every endpoint returns errors in the same shape — making it easier for clients to parse and display errors.
Current State
`pipeline.config.json` defines the envelope:
```json
"envelope": {
"dataField": "data",
"metaField": "meta",
"errorField": "error"
}
```
But no guide explains how to structure error responses within this envelope.
Acceptance Criteria
```json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{ "field": "email", "message": "Invalid email format" }
]
}
}
```