Errors

Every error code a Technology Provider can receive, what it means, and what to do about it.

Provider calls use the Open Network's error envelope: success: false, a message written for people, a stable machine-readable code, sometimes details, and a requestId. Branch on code, never on message.

Error envelope
{
  "success": false,
  "message": "This partner has paused your connection. Nothing can be done for them until they resume it.",
  "code": "connection_paused",
  "requestId": "3f0c9f8e-6a1d-4f5e-9b1a-2f1c0d9e7a41"
}

Keys and partner context#

CodeStatusMeaningWhat to do
open_network_key_invalid401The key is missing, malformed, unknown, revoked or expired, or its secret is wrong.Check the key. Do not retry.
provider_suspended403Localoy has suspended your company.Stop, and contact your partnerships contact.
provider_key_required403A partner key called /connections… or /webhooks….Use a provider key.
partner_id_required400A partner-scoped call has no X-Localoy-Partner-Id, or it is empty.Send the header.
connection_not_found404The partner is not connected to you: never connected, its code not yet claimed, or disconnected.Stop acting for the partner.
connection_paused403The partner has paused you.Hold its work until connection.updated with reason resumed.
open_network_scope_required403The connection's effective scopes lack the endpoint's scope. details.requiredScope names it; details.grantedScopes lists the effective scopes.Ask the partner to grant the scope.

Connections#

CodeStatusMeaningWhat to do
connection_code_invalid404The code is unknown, expired or already used, belongs to another provider, or its connection was disconnected.Ask the partner for a new code.
connection_claim_rate_limited429More than 20 claims in 15 minutes with this key.Wait for Retry-After.
connection_not_found404GET /connections/{partnerId} found no connection with that partner.—

Acting for partners#

CodeStatusMeaning
open_network_item_managed_elsewhere409The externalId belongs to an item the partner or another integration manages. Use another externalId.
open_network_item_not_found404You have no item with that externalId for this partner. Items that others created answer the same.
open_network_bookable_not_found404localoyRef names a bookable that is not the partner's, or not in your modules.
open_network_bookable_already_linked409Another item is already linked to that bookable.
payment_session_not_found404The partner has no session with that ID in this key's environment, or its order is outside your modules.

The other catalogue and payment codes mean what they mean for a partner's key. See the Open Network API errors.

Webhooks#

CodeStatusMeaning
webhook_endpoint_not_found404No endpoint of yours has that ID.
webhook_delivery_not_found404No delivery of yours has that ID.
webhook_endpoint_limit_reached409You already have 10 endpoints. Delete one first.
webhook_endpoint_duplicate409You already have an endpoint with this URL in this environment. Change its events instead.
webhook_endpoint_disabled409A replay to a disabled endpoint. Enable the endpoint first.
webhook_replay_connection_inactive409A replay of a delivery about a partner whose connection is paused or has ended. A connection.* delivery can always be replayed.
invalid_events400events is not a non-empty list of known event names. details.allowed lists them.
event_not_subscribable400events includes ping, which every endpoint receives from its test anyway.
environment_immutable400A PATCH tried to change environment. Create an endpoint in the other environment instead.

Refused webhook URLs#

A URL that fails a check is refused with 400 and one of these codes:

CodeThe URL
not_a_urlIs missing, or is not an absolute URL.
too_longIs longer than 2,048 characters.
protocol_not_allowedDoes not use http or https.
https_requiredUses http. Use https.
credentials_in_urlContains a username or password.
fragment_not_allowedContains a #fragment.
port_not_allowedUses a blocked port. See URL requirements.
host_not_resolvableHas a host name that does not resolve.
private_addressResolves to a private, loopback or link-local address.

Validation errors without a code#

Invalid input on a single field — a missing code in a claim body, an unknown environment, a limit out of range — is answered 400 with a message that names the field, and may carry no code. These are bugs in the calling code: log the message and fix the request.

Handling errors#

StatusRetry?
400, 401, 404No. Fix the request, the key or the ID first.
403No. A paused connection, a missing scope or a suspension needs someone else to act first.
409Not as is. Read the current state, then decide.
429Yes, after the Retry-After header's number of seconds.
500, 503, network errorsYes, with exponential backoff. A claim is safe to retry with the same code.