Error codes
Error codes
Operator routes use the standard H3/Nitro error envelope. Clients should branch on HTTP status and statusMessage; message is human-readable context and may equal the code.
{
"statusCode": 403,
"statusMessage": "INSUFFICIENT_SCOPE",
"message": "INSUFFICIENT_SCOPE"
}
Authentication
UNAUTHORIZED-> missing or malformed bearer headerINVALID_API_KEY-> wrong, revoked, or inactive-operator API keyINVALID_OPERATOR_SESSION-> expired or revoked staff sessionINSUFFICIENT_SCOPE-> active API key or staff session lacks the required scopeSTAFF_SESSION_REQUIRED-> staff management, private market request, or support route called with an API key; wildcard scope does not bypass the restriction
Resource and input
INVALID_NAMEINVALID_LAUNCH_PARAMETERSINVALID_EXTERNAL_USER_IDINVALID_SCOPESINVALID_IDINVALID_MARKETINVALID_MARKET_IDINVALID_TRADE_IDINVALID_AMOUNTINVALID_CATEGORYINVALID_VISIBILITYINVALID_DELIVERY_IDNOT_FOUNDINVALID_URLINVALID_OPERATOR_HOSTINVALID_ENABLED_EVENTSINVALID_STATUSINVALID_ENDPOINT_IDINVALID_DIRECTIONINVALID_AMOUNT_MINORINVALID_IDEMPOTENCY_KEYINVALID_USER_IDINVALID_STAFF_IDINVALID_INPUTINVALID_EMAILFULL_CONTRACT_CONFIRMATION_REQUIREDOPERATOR_USER_NOT_FOUNDTRADE_NOT_FOUNDMARKET_NOT_FOUNDWEBHOOK_ENDPOINT_NOT_FOUNDWEBHOOK_DELIVERY_NOT_FOUNDSTAFF_NOT_FOUNDUSER_NOT_FOUNDOPERATOR_USER_CREATE_FAILEDAPI_KEY_CREATE_FAILEDWEBHOOK_ENDPOINT_CREATE_FAILEDWEBHOOK_ENDPOINT_UPDATE_FAILEDSIMULATOR_USER_CREATE_FAILEDSIMULATOR_USER_UPDATE_FAILEDFX_RATE_UNAVAILABLEFX_RATE_INVALID
The query helpers also return field-specific codes such as INVALID_SORT, INVALID_TYPE, INVALID_CREATED_FROM, INVALID_CREATED_TO, INVALID_ACTIVITY_FROM_DATE, and INVALID_ACTIVITY_TO_DATE. HTML Portfolio controls add INVALID_PRODUCT, INVALID_TAB, INVALID_LOCALE, and INVALID_TICKET_PAGE / INVALID_TICKET_PAGE_SIZE. Consult each endpoint for strict versus defaulting pagination.
409 MARKET_OUTSIDE_RESOLUTION_HORIZON means a market cannot be shown under the operator's current maximum-duration setting; hiding it remains allowed. Other-operator private markets return not-found rather than allowing visibility rules to grant access.
Opinion sell policy
PARTIAL_SHARE_SELL_DISABLED means an unexecuted sell does not match the user's entire current holding in the selected outcome while Polynion Admin has disabled partial selling. It may appear as a quote rejection or an order failure reason. Refresh the holding and obtain a new full-position quote; do not automatically increase an existing order or retry it with a new amount.
Market PnL and cash-flow triage
| HTTP status | Code | Meaning/action |
|---|---|---|
400 | OPERATOR_SELECTOR_NOT_ALLOWED | Omit operatorId / operator_id; authentication determines the operator. |
400 | INVALID_RESOLVED_FROM_DATE, INVALID_RESOLVED_TO_DATE, INVALID_RESOLVED_DATE_RANGE | Use valid calendar dates in ascending order. |
400 | INVALID_MARKET_ID, INVALID_SOURCE_ID, INVALID_TRIAGE_SOURCE, INVALID_KIND, INVALID_ISSUE_STATE | Correct the exact market/source selector or issue-state filter. |
404 | CASH_ISSUE_NOT_FOUND | No readable source matches the detail path. |
403 | INSUFFICIENT_SCOPE | PnL requires both trade/redemption read scopes; triage additionally requires balance-operation read. |
Triage is read-only. A failed or unknown operation is not permission to repeat a payment with a fresh idempotency key.
Private market requests
400 INVALID_MARKET_REQUEST: request/query schema, unknown field, operator selector, dates, horizon, or pagination is invalid.400 INVALID_CATEGORY/INVALID_TAGS: selected taxonomy is invalid or inactive.404 MARKET_REQUEST_NOT_FOUND: request does not exist for the authenticated operator.409 OPERATOR_NOT_ACTIVE: operator is no longer active.500 MARKET_REQUEST_UNAVAILABLE: request operation failed; inspect existing requests before repeating a create after an ambiguous result.
Private-market review can also reject stale dates (MARKET_REQUEST_DATES_EXPIRED) or an already-reviewed request (MARKET_REQUEST_ALREADY_REVIEWED); operator routes do not expose an approve/reject mutation.
Operator support
400 INVALID_INPUT: invalid list/body/ID, unknown field, or attempted operator selector.404 TICKET_NOT_FOUND: missing/inaccessible ticket or ineligible mutation actor.409 TICKET_CLOSED: reopen before sending a reply.
Support requires a staff session but no additional resource scope.
Opinion settlement reports
| HTTP status | Code | Action |
|---|---|---|
400 | INVALID_REPORT_MONTH | Use strict YYYY-MM in years 2000..2100. |
400 | INVALID_REPORT_PREVIEW, INVALID_REPORT_FORMAT | Use preview=true/false on read or a supported export format. |
400 | REPORT_MONTH_NOT_COMPLETE | Use a completed month; only the read route can preview the current month. Future months remain invalid. |
400 | OPERATOR_SELECTOR_NOT_ALLOWED | Remove the operator selector. |
404 | MINI_APP_OPERATOR_NOT_FOUND | Operator no longer exists in the report context. |
409 | REPORT_MONTH_NOT_COMPLETE | Export completeness guard found an incomplete period. |
409 | SETTLEMENT_FEE_SNAPSHOT_INCOMPLETE | Historical fee evidence must be reconciled before export. |
409 | SETTLEMENT_PAYOUT_RECONCILIATION_INCOMPLETE | Reconcile payout cash evidence before export. |
409 | SETTLEMENT_UNDERWRITING_ATTRIBUTION_INCOMPLETE | Required v3 public/private attribution is incomplete/invalid. |
422 | INVALID_OPERATOR_TIMEZONE | Ask an authorized administrator to correct the operator timezone; do not substitute UTC client-side. |
Polyflight
INVALID_PRODUCTPRODUCT_DISABLEDPOLYFLIGHT_REQUIRES_IDRINVALID_FLIGHT_IDINVALID_TICKETIDINVALID_OPERATIONIDINVALID_IDPOLYFLIGHT_FLIGHT_NOT_FOUNDPOLYFLIGHT_TICKET_NOT_FOUNDPOLYFLIGHT_OPERATION_NOT_FOUNDPOLYFLIGHT_TERMS_NOT_FOUNDPOLYFLIGHT_STATEMENT_NOT_FOUNDINVALID_CONTRACT_TEST_SCENARIODEDICATED_TEST_USER_CONFIRMATION_REQUIREDUNSAFE_POLYFLIGHT_CONTRACT_TEST_AMOUNT
Polyflight not-found responses also protect tenant isolation: do not infer that an identifier belongs to another operator. PRODUCT_DISABLED means the selected product is not enabled; launch does not fall back to Opinion. POLYFLIGHT_REQUIRES_IDR means the operator currency is incompatible with a Polyflight launch. A flight with no committed comparison valuation is shown as temporarily unavailable for IDR entry; it does not fall back to Opinion FX.
Simulator
SIMULATOR_DISABLEDSIMULATOR_USER_NOT_FOUND
Wallet adapter
REST_V1_UNSUPPORTED_CURRENCYINVALID_BASE_URLINVALID_FIELDBEARER_TOKEN_REQUIREDINVALID_WALLET_ADAPTER_CONFIGWALLET_ADAPTER_ENCRYPTION_NOT_CONFIGUREDWALLET_ADAPTER_UPDATE_FAILED
REST_V1_MUTATION_IDENTITY_MISMATCH can appear as wallet processing failure context when a non-null echoed external user, idempotency key, currency, or amount contradicts the original mutation. This is an ambiguous/unknown wallet result, not proof that the wallet rejected or rolled back the payment. Reconcile the original operation and key; never retry it as a new-key payment. It is not necessarily a top-level Operator API error envelope.
Staff auth
INVALID_OPERATOR_SESSIONPASSWORD_CHANGE_NOT_SUPPORTEDRATE_LIMIT_EXCEEDEDINVALID_CREDENTIALSMULTIPLE_OPERATOR_MEMBERSHIPS_UNSUPPORTED
Staff management
INVALID_SCOPESWILDCARD_SCOPE_NOT_ALLOWEDCANNOT_ASSIGN_SCOPESELF_ACCESS_UPDATE_FORBIDDENSELF_PASSWORD_RESET_FORBIDDENNO_UPDATESEMAIL_EXISTS
Operator action
| HTTP status | Typical codes | Operator action |
|---|---|---|
400 | INVALID_*, FULL_CONTRACT_CONFIRMATION_REQUIRED, NO_UPDATES, WILDCARD_SCOPE_NOT_ALLOWED, SELF_ACCESS_UPDATE_FORBIDDEN, SELF_PASSWORD_RESET_FORBIDDEN, PASSWORD_CHANGE_NOT_SUPPORTED | Correct input or use the supported staff workflow. INVALID_CREDENTIALS also uses 400 on password change. |
401 | UNAUTHORIZED, INVALID_API_KEY, INVALID_OPERATOR_SESSION, INVALID_CREDENTIALS | Replace or refresh the credential; do not retry unchanged. |
403 | INSUFFICIENT_SCOPE, STAFF_SESSION_REQUIRED, CANNOT_ASSIGN_SCOPE, PRODUCT_DISABLED, POLYFLIGHT_REQUIRES_IDR | Use the required scope/auth type/configuration or ask authorized staff. |
404 | NOT_FOUND, *_NOT_FOUND, SIMULATOR_DISABLED | Confirm ownership, environment, and identifier. |
409 | EMAIL_EXISTS, MULTIPLE_OPERATOR_MEMBERSHIPS_UNSUPPORTED, TICKET_CLOSED, MARKET_OUTSIDE_RESOLUTION_HORIZON, SETTLEMENT_*_INCOMPLETE | Resolve the conflicting state/evidence; repeating the same input is not a remedy. |
422 | INVALID_OPERATOR_TIMEZONE | Escalate configuration; preserve operator-local accounting boundaries. |
429 | RATE_LIMIT_EXCEEDED | Wait for the login rate-limit window before retrying. |
502 | FX_RATE_INVALID | Retry later; if persistent, escalate the operator FX configuration/runtime issue. |
503 | FX_RATE_UNAVAILABLE on Portfolio | Retry later or escalate persistent FX unavailability; do not substitute a fabricated rate. Native-IDR Polyflight HTML history can remain readable. |
500 | *_FAILED, MARKET_REQUEST_UNAVAILABLE | Preserve redacted request evidence and escalate; do not assume a mutation rolled back. |
For every failure, confirm the endpoint's required scope, request schema, environment, and operator-owned resource before escalating.
