Errors you can act on.
Every error is an RFC 9457 problem document, served as application/problem+json, with a stable code and the request’s billing evidence.
Problem members
{
"type": "https://developers.morphiqlabs.com/docs/errors#invalid_field",
"title": "Invalid field",
"status": 422,
"detail": "finite bounds must satisfy 0 < lower < upper",
"code": "invalid_field",
"field": "lower",
"metadata": {
"request_id": "fr-0000000000000000-0000000000000001",
"api_version": "v1",
"service_version": "0.9.1",
"contract_sha256": "<sha-256 of GET /openapi.json>",
"engines": [
{
"name": "morphiq-risk",
"version": "0.46.1",
"revision": "0c90488bc377d0511122d1b7ec14895ee565cd7d"
}
],
"cu_charged": 0
}
}type is a URI that resolves to this page’s entry for the problem; title summarizes it and is the same for every occurrence. status repeats the HTTP status and detail explains this occurrence. Match on code: it is stable, and it is the anchor of type. Do not parse title or detail.
field, when present, is the dotted path of the input at fault, for example books[0].positions[2].quantity. Decoding problems name it too: a value of the wrong type, and a missing or unknown member, for example requests[1].strike. Inside a batch item, field is relative to the item its index names. metadata is the response metadata every response carries, including request_id, the service and contract identity, and commercial evidence.
Charges and retries
An error does not imply a zero charge. Pre-execution refusals charge zero, including inputs the model refuses: a single request is refused before reservation, and a refused batch item is reported in place and left out of the quote and charge. Once numerical execution starts, the charge is committed and a later numerical failure, timeout or disconnect retains it. Read metadata.cu_charged to see what the request cost. A missing response is an unknown outcome, not evidence of zero charge.
Refusals you can outlive by waiting carry Retry-After; the table below marks them. Each is a 429 or 503 refused before any charge. rollout_unavailable is a 503 without it: the operation stays unavailable until it is enabled for the account, so do not retry it automatically. Retry-After schedules a retry; it does not make a retry free. A retried request is a new request and is quoted and charged on its own.
Where a solve stopped
{
"type": "https://developers.morphiqlabs.com/docs/errors#model_domain",
"title": "Outside model domain",
"status": 422,
"detail": "bjerksund_stensland_1993 does not cover this region: zero yield under a negative rate",
"code": "model_domain",
"solve_trial": {
"phase": "search",
"coordinate": "rate",
"coordinate_value": -0.05,
"evaluations": 1
},
"metadata": {
"request_id": "fr-0000000000000000-0000000000000002",
"cu_charged": 200
}
}When a target solve aborts because the pricing method refused a trial, code is that refusal and solve_trial records the phase, the solved coordinate, the trial’s coordinate value and the evaluations attempted, including the refused one. phase is search when a target evaluation was refused during the scan or refinement. The solve charge is committed at execution start and retained.
Book solves locate the refusal the same way on the spot coordinate. When one position refused, field names it, for example book.positions[1]; when the book total itself overflows, code is unrepresentable_value and field is absent. A position refused while the solve checked a domain edge or the stored spot before scanning reports that level with phase: domain_check and evaluations: 0. A position refused at its stored inputs before any level was tried has field and no solve_trial.
Failed items and unavailable Greeks
Batch and scenario responses report a failed item as {"status":"error","error":{…}}, where error has the same members as a top-level problem. Its status is the status the same request would have returned on its own. Greeks that cannot be computed at the given inputs appear under unavailable, keyed by Greek, as problems of the same shape; an absent Greek is never zero.
gRPC calls carry the same problem in the ErrorResponse status detail, with its metadata. The gRPC status follows the HTTP status, except that rollout_unavailable is FAILED_PRECONDITION rather than UNAVAILABLE, so client retry policies do not repeat it. See the API reference.
Problem types
| Code | Status | Retry-After | Title | Meaning |
|---|---|---|---|---|
accounting_backpressure | 503 | Yes | Usage accounting saturated | Usage accounting cannot accept more work right now. Nothing was charged; retry with backoff. |
admission_unavailable | 503 | Yes | Admission unavailable | The admission service could not be reached. Nothing was charged; retry with backoff. |
compute_capacity_exhausted | 503 | Yes | Compute capacity exhausted | No execution capacity is available. Nothing was charged; retry with backoff. |
compute_deadline_exceeded | 504 | No | Compute deadline exceeded | Execution did not finish within the compute deadline. A charge committed at execution start is retained; see metadata.cu_charged. |
concurrency_limited | 429 | Yes | Concurrency limit reached | The account's concurrent request allowance is in use. Nothing was charged; retry when a request completes. |
cost_limit_exceeded | 409 | No | CU ceiling exceeded | The quoted charge exceeds the X-MorphIQ-Max-CU ceiling. Nothing was charged. |
derivative_not_resolved | 422 | No | Derivative not resolved | Numerical refinement or rounding checks did not resolve the requested derivative at these inputs. |
forbidden | 403 | No | Account forbidden | The account is not permitted to use this service. |
funding_expired | 409 | No | Reservation expired | The funding reservation expired before execution began. Nothing was charged. |
funding_unavailable | 503 | Yes | Funding unavailable | Funding could not be reserved right now. Nothing was charged; retry with backoff. |
ingress_capacity_exhausted | 503 | Yes | Ingress capacity exhausted | The service cannot accept more request bodies right now. Nothing was charged; retry with backoff. |
insufficient_funds | 402 | No | Insufficient funds | The account's funding is spent until a top-up or the next budget period. Nothing was charged. |
internal_error | 500 | No | Internal error | The service failed unexpectedly. Check metadata.cu_charged before retrying. |
invalid_body | 400 | No | Invalid request body | The request body could not be read as the declared representation. |
invalid_field | 422 | No | Invalid field | A request input is outside its accepted range or combination; field names it. |
invalid_json | 400 | No | Malformed JSON | The body is not syntactically valid JSON. |
invalid_pricing_request | 422 | No | Invalid pricing request | The pricing method refused these inputs before any calculation. |
invalid_request | 422 | No | Invalid request | The JSON is well formed but does not match the operation's schema, for example an unknown field or variant. |
invalid_wire_body | 400 | No | Invalid Protobuf body | The Protobuf body could not be decoded or is missing a required field. |
method_not_allowed | 405 | No | Method not allowed | The route does not accept this HTTP method. |
model_domain | 422 | No | Outside model domain | The inputs are outside the selected model's mathematical domain. |
model_validity | 422 | No | Outside model validity | The inputs are outside the region where the selected model's result is valid. |
not_acceptable | 406 | No | Response type not acceptable | No supported response media type satisfies the Accept header. |
not_entitled | 403 | No | Not entitled | The account's plan does not include this operation or model. |
not_found | 404 | No | Not found | No route matches the request path. |
policy_unavailable | 503 | Yes | Policy unavailable | No valid policy publication is available, so protected work is refused. Nothing was charged. |
pricing_failed | 500 | No | Pricing failed | The pricing method failed internally. A charge committed at execution start is retained; see metadata.cu_charged. |
rate_limited | 429 | Yes | Rate limited | The request rate allowance is exhausted. Nothing was charged; retry after Retry-After. |
request_body_timeout | 408 | No | Request body timeout | The request body did not arrive within the body deadline. |
request_too_large | 413 | No | Request too large | The request body exceeds its size limit. Collection limits inside a body are invalid_field. |
rollout_unavailable | 503 | No | Operation not enabled | This operation is not currently enabled for the account, or this deployment does not serve it. Nothing was charged. Waiting does not change it: the operation stays unavailable until it is enabled, so do not retry automatically. |
service_not_ready | 503 | Yes | Service not ready | The service is starting or draining. Nothing was charged; retry with backoff. |
unauthenticated | 401 | No | Unauthenticated | A valid credential is required for this operation. |
unpriceable_work | 422 | No | Unpriceable work | The account's cost schedule has no rate for this work. |
unrepresentable_price | 422 | No | Unrepresentable price | The price is not representable as a finite binary64 value at these inputs. |
unrepresentable_value | 422 | No | Unrepresentable value | A position value, P&L or total is not representable as a finite binary64 value: quantities, multipliers or the solve domain are too large. field names the position when one is at fault and solve_trial gives the spot where a solve stopped. A charge committed at execution start is retained. |
unrepresentable_volatility | 422 | No | Unrepresentable volatility | The implied volatility is not representable at these inputs. |
unsupported_accuracy_contract | 422 | No | Outside accuracy contract | The engine cannot offer its accuracy contract for this quantity at these inputs. |
unsupported_media_type | 415 | No | Unsupported media type | The operation does not accept the request's Content-Type. |
unsupported_operation | 422 | No | Unsupported operation | The selected model does not support this operation. |
unsupported_quantity | 422 | No | Unsupported quantity | The selected model does not offer this quantity at these inputs. |