← nopea.tech
ScaneaConsenteaMaskeaBundlesPricing
Retries & reliability

Custom retry predicate

The default only retries 429/5xx and a few network error codes -- pass isRetryable to match a provider's own non-standard error shape.

← All recipes
import { Maskea, retries } from "@nopeatech/maskea";

const maskea = new Maskea().use(
  retries({
    max: 3,
    isRetryable: (error) => {
      const e = error as { code?: string };
      return e?.code === "rate_limit_exceeded" || e?.code === "model_overloaded";
    },
  })
);

Checked against the shipped @nopeatech/maskea API. Full docs at nopea.tech/maskea/docs.

More in Retries & reliability

Fixed backoff for a strict internal SLA →