Skip to main content
The PlaneConnection API returns consistent JSON error responses for all error types. Every error response includes a human-readable message, a machine-readable code, and a request ID for tracing.

Error Response Format

Always include the requestId when contacting support about an API error. It enables fast lookup in the request logs.

HTTP Status Codes

Validation Errors

When a request fails validation (status 400), the error field contains the validation details as a JSON string. The structure follows Zod’s flatten() format:
Parse the error field to extract per-field validation messages:

Common Error Scenarios

401 — Missing token
Fix: Include a valid Authorization: Bearer <token> header or X-API-Key header.401 — Expired token
Fix: Refresh your session token and retry.

Error Handling Best Practices

Production vs Development

In production, the API returns generic error messages for 500 errors to avoid leaking internal details:
In development and staging environments, the actual error message is returned for easier debugging.

Error Tracking

Server errors (5xx) are automatically tracked and reported to the platform’s error monitoring system. Error metrics are collected for operational dashboards.
Last modified on April 11, 2026