The ProblemDetails envelope
Every non-success response from the Raise API uses one of two envelope shapes — both based on RFC 7807. The baseProblemDetails envelope:
| Field | Description |
|---|---|
type | A URI reference identifying the problem type. Often a link to a spec defining the error. Can be null. |
title | A short, human-readable summary of the problem type — like "Bad Request" or "Not Found". |
status | The HTTP status code as a number — matches the response’s actual status. |
detail | A specific, human-readable explanation of this particular occurrence. The most useful field for diagnostics. |
instance | A URI identifying this specific occurrence — often the request path that produced the error. |
The validation variant
For validation errors (typically400 Bad Request on a write endpoint), the response uses HttpValidationProblemDetails, which extends ProblemDetails with a per-field error map:
errors object is keyed by field path with arrays of error messages. Use it to surface field-specific feedback in your integration’s UI rather than just showing the top-level title.
Documented status codes
The Raise OpenAPI spec formally documents four success/error status codes across the surface:| Status | Meaning | Common causes |
|---|---|---|
200 OK | Request succeeded | Default success response on most endpoints. |
204 No Content | Request succeeded with no response body | Returned by some delete/cancel operations. |
400 Bad Request | Request was syntactically valid but rejected | Validation failure, missing required field, malformed value. The errors map (when present) identifies the field-level issues. |
404 Not Found | The requested resource doesn’t exist | Wrong ID, deleted record, or typo in the path. |
400 responses appear on most endpoints; 404 appears on resource-specific paths (/api/Donor/{donorId}, etc.).
Status codes that occur but aren’t in the spec
A few status codes aren’t formally documented in the Raise spec but partner integrations will encounter them. Handle them defensively even though the spec is silent.| Status | Why it happens despite not being in the spec |
|---|---|
401 Unauthorized | The spec requires Bearer authentication on every endpoint — missing or invalid auth produces 401, but this isn’t declared per-endpoint. |
403 Forbidden | The authenticated token doesn’t have permission for the requested operation (e.g., a read-only token attempting a write). |
429 Too Many Requests | Rate limiting. The spec doesn’t document rate limit responses but they occur under sustained load. |
500 Internal Server Error | Unexpected server-side errors. Always possible on any endpoint. |
502, 503, 504 | Infrastructure-layer issues — gateway errors, service unavailability, timeouts. |
ProblemDetails envelope — though the detail and type fields may be less informative than for documented errors.
Future updates to the Raise OpenAPI spec are expected to add explicit documentation for
401, 403, 429, and 500 responses across all endpoints. Until then, code defensively as if every endpoint could return these status codes — because it can.Handling errors in code
The pattern: check the status code, parse the body if non-2xx, route by status class.
JavaScript
204 No Contentis handled explicitly. Some delete and cancel endpoints return204with no body — callingresponse.json()on an empty body throws. Detect204and returnnullinstead.- The body is attempted to be parsed as JSON. Most errors return JSON; some (gateway errors, network issues) may not. Fall back to the status text.
- The error carries structured detail. Downstream handlers can switch on
err.statusfor retry decisions and surfaceerr.problem.detailfor user-facing messages.
Routing by status class
For partner integrations doing retries, route errors by category — see Error Recovery Patterns for the full pattern. The Raise-specific summary:| Category | Status codes | Recovery |
|---|---|---|
| Success | 200, 204 | None needed |
| Permanent client error | 400, 403, 404, 422 | Don’t retry — the request itself needs to change |
| Persistent-recoverable | 401 | Don’t retry — the credential needs to be refreshed |
| Transient | 429, 500, 502, 503, 504, network errors | Retry with exponential backoff |
400 won’t make it succeed — the request body needs to change. Retrying a 401 won’t make it succeed — the token needs to be replaced. Retrying a 500 usually will succeed within a few attempts.
Validation errors in detail
When the spec documents400 Bad Request on a write endpoint, the most common cause is field-level validation. The response includes the errors map keyed by field name:
JavaScript
What the detail field gives you
The detail field is the most useful diagnostic in the ProblemDetails envelope. Three patterns for using it well:
Log it on every non-2xx
JavaScript
Surface it to your UI carefully
detail is human-readable but written for an API consumer (developer), not an end user. It may contain technical jargon, internal field names, or unhelpful messages like "An error occurred while processing your request." Sanitize before surfacing to non-technical users.
A reasonable pattern: use errors for field-level user-facing messages; use detail for logs and developer-facing error contexts only.
Don’t switch on it
The exact text ofdetail is not a stable contract. The platform may rephrase messages, translate them, or improve them. Code that parses or matches on detail strings is brittle — switch on status codes and structured type URIs instead.
Network and TLS errors
Errors that occur before the request reaches Raise are network-layer issues — they don’t produce a ProblemDetails response because the server never saw the request:| Error | Cause |
|---|---|
| DNS resolution failure | Wrong hostname (typo in prod-api.raisedonors.com) or local DNS issue |
| Connection refused | Network firewall blocking outbound traffic, or running against a wrong host |
| TLS certificate validation failed | A man-in-the-middle proxy intercepting the connection, or running against a self-signed-certificate host |
| Timeout | Network latency, server-side slowness, or downstream overload |
Where to go next
Rate Limits
The detail on
429 responses and how to avoid them.Error Recovery Patterns
The retry strategy, dead-letter handling, and circuit breaker patterns for production integrations.
Authentication
The deeper coverage of
401 causes and remediation.Pagination and Filtering
Other error patterns specific to paginated reads.