Skip to main content

Error Handling

The Power Signals API uses standard HTTP status codes and returns structured error responses.

Error Response Format

All errors follow a consistent structure:

Status Codes

Common Errors

Missing Parameters

Fix: Include both start and end query parameters in ISO-8601 format.

Invalid DateTime

Fix: Use a valid ISO-8601 format like 2026-01-01T00:00:00Z or 2026-01-01T00:00:00+02:00.

Unsupported Interval

Fix: Use one of the supported intervals listed in the error detail.

Bad Time Range

Fix: Ensure your start parameter is before your end parameter.

Authentication Failure

Fix: Include a valid X-API-KEY header in your request.

Data Delay Responses

If upstream data feeds (Eskom, SAPP) are delayed, the API will not return stale data. Instead, you’ll receive a response indicating the delay:
This is not an error — it indicates that the most recent data hasn’t been published yet by the upstream source.

Handling Errors in Code