Skip to main content
The Raise API returns errors in the RFC 7807 ProblemDetails format — the standard problem-details envelope used by ASP.NET Core. This page covers the envelope structure, the status codes documented in the spec, the ones that aren’t documented but occur in practice, and the patterns for handling them in integration code.

The ProblemDetails envelope

Every non-success response from the Raise API uses one of two envelope shapes — both based on RFC 7807. The base ProblemDetails envelope:
The five fields:

The validation variant

For validation errors (typically 400 Bad Request on a write endpoint), the response uses HttpValidationProblemDetails, which extends ProblemDetails with a per-field error map:
The 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 five success/error status codes across the surface: 401 is documented on every endpoint, since every endpoint requires Bearer authentication. Documented 400 responses appear on most endpoints; 404 appears on resource-specific paths (/api/Donor/{donorId}, etc.).

What each endpoint’s 400 and 404 mean

The generic “Bad Request” and “Not Found” labels are only the starting point. In the API reference, each endpoint’s 400 and 404 responses describe what that particular endpoint rejects — which parameter or field was at fault, whether the stored record changed, and whether retrying can help. A few patterns worth knowing:
  • On writes, a 400 means nothing was persisted. Update a Campaign leaves the stored campaign untouched; Transfer a Donor Gift leaves the gift with its current donor.
  • On deletes, a 400 can mean the record still has dependencies. For campaigns, custom fields, and projects, read the dependency count first and reassign the dependent records with the matching replace endpoint.
  • On Cancel a Recurring Gift, a 400 means the schedule exists but isn’t cancellable — including when it’s already cancelled — while a 404 means the ID doesn’t resolve at all. Re-read the schedule rather than retrying.
  • On nested donor resources (addresses, contact methods, emails, phone numbers), a 404 also covers the case where the child record exists but belongs to a different donor. The detail field names the record that was missing.
  • On existence checks like Check if Segment Code Exists, a 400 means the query parameter itself was rejected — a code that simply isn’t in use returns 200 with a negative result.
Fourteen endpoints — Process a Donation Payment, Capture a Lead, the Query endpoints, and a few others — document no error responses beyond 401. They still return the ProblemDetails envelope; the spec just doesn’t enumerate their failure cases, so treat 400 and 404 as possible there too.

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. For each of these, the response body should still follow the ProblemDetails envelope — though the detail and type fields may be less informative than for documented errors.
401 used to be in this list; it’s now documented on every endpoint. Future updates to the spec are expected to add explicit documentation for 403, 429, and 500. 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
Three things this gets right:
  • 204 No Content is handled explicitly. Some delete and cancel endpoints return 204 with no body — calling response.json() on an empty body throws. Detect 204 and return null instead.
  • 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.status for retry decisions and surface err.problem.detail for 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: Retrying a 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 documents 400 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
For partner integrations exposing a UI to end users, surface the field-level messages directly — they’re typically more helpful than generic “Submission failed” messages.

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
This produces searchable log entries with enough context to investigate later — without leaking sensitive request body content.

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 of detail 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: Most clients surface these as exceptions before any HTTP response is available. Handle them as transient errors with retry — see Error Recovery Patterns for the retry pattern.

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.
Last modified on July 28, 2026