Skip to main content
All errors use a consistent envelope:
  • success: always false for errors.
  • code: the HTTP status code.
  • message: a short human-readable summary.
  • fields: validation details when a request fails validation.

Error codes

Common validation errors

Validation failures return 400 with a fields array describing each problem:

Handling errors

  • Check code and handle each status explicitly.
  • For 429, retry with exponential backoff.
  • For 401, verify your api-key header and that the key belongs to the Bonai News API product workspace.
  • For 402, check your plan’s limits.