Skip to main content
Every Cybreeze API error is JSON, but it comes in one of two shapes depending on how far your request got. Parse for both: a client that reads only one will log undefined for half its failures.

The two shapes

The first shape, with error, means the request never reached Cybreeze: the key, the path, the size or the rate stopped it at the door. The second shape, with type, means Cybreeze itself answered. Some responses may also carry a details field with field-level information.

Refused at the gateway

Refused by the API

A 401 can come from either layer, and the shape tells you which. "error": "invalid_api_key" means the gateway does not know your key. "type": "unauthorized" means the gateway accepted it and we did not, which is almost always a key that was disabled or deleted.

What to retry

Nothing in the second column changes on a second attempt. A 401 in particular is not a transient error: either the key is wrong or it has been turned off, and retrying it just fills your logs.

Handling both shapes