Skip to main content
Start with the HTTP status, error body, and request identifier returned by the operation. Error envelopes vary across MKA1 services; use the endpoint’s documented schema rather than assuming every error has the same fields.

Classify the failure

Back off between attempts

For a retryable failure, wait progressively longer between attempts, add jitter so concurrent clients do not retry together, and bound both the attempt count and total time. Honor Retry-After when an endpoint returns it. Check the selected SDK’s retry settings before adding another retry loop. Nested retry policies can multiply the number of requests.

Avoid duplicate writes

A timeout does not prove the server rejected the request. Before repeating a create operation, determine whether the resource was created. Where an endpoint supports an idempotency key, reuse the same key only for an identical retry. Generate a new key for a new operation. Do not assume that an idempotency header is supported by every API. For Compute, use the examples in Run a fine-tune job and Deploy a model server.

Handle streaming and background work

A streaming connection can end after delivering partial output. Avoid treating the partial output as a completed result. Follow the status and retrieval mechanisms described in Background responses.

Separate refusals from transport errors

A guardrail can return a refusal in a successful HTTP response. Inspect the output; retrying the same blocked request is not a transport-recovery strategy.

Investigate a failure