Skip to main content
The Novu API uses conventional HTTP status codes to indicate the success or failure of a request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate a request that failed given the information provided (for example, a required parameter was missing or validation failed). Codes in the 5xx range indicate an error on Novu’s servers and are rare. Every error response shares a consistent JSON shape, so you can handle errors the same way across all endpoints.

HTTP status codes

Error response shape

All errors return a JSON body with a consistent set of fields:
Some errors include additional context fields (for example, currentCount and limit on a 402 plan-limit error). For backward compatibility, these context fields are flattened to the top level of the response body alongside the standard fields.

Validation errors

Validation errors describe exactly which fields were rejected. The format depends on where validation happens.
Most request body validation returns 422 Unprocessable Entity with an errors object keyed by field name. Each entry lists the failing messages and the rejected value:
Use the errors keys to map each message back to the form field or parameter that caused it.

Server errors

500 responses include an errorId that uniquely identifies the failure in Novu’s monitoring systems:
When contacting support, include the errorId so the team can locate the exact request.

Debugging requests

Beyond the error body, Novu gives you several ways to trace a request:

Handling errors

The server-side SDKs throw a typed error you can inspect. Check the statusCode to branch your logic, and read message or errors for details: