/** * 4xx statuses that are nevertheless worth retrying: the provider is refusing this attempt, * not the request. Timeouts and locks clear on their own; a rate limit is an instruction to * come back later, which is exactly what the next drain pass does. */ export declare const RETRYABLE_CLIENT_STATUSES: ReadonlySet; /** * The HTTP status an error carries, if it carries one. Structural on purpose (see above): * `ScriveApiError` and any future connector's error type both satisfy it without a shared base * class, and an error that carries no status — a network failure, a bug — reads as `undefined`, * which is the honest answer and keeps it retryable. */ export declare function providerErrorStatus(error: unknown): number | undefined; /** * Is this delivery over? — the DRAIN's question, and the only one that decides retries. * * A non-retryable 4xx, whoever raised it: attempt 101 carries the identical bytes past the * identical check. Deliberately blind to WHO refused, because terminality does not depend on * it — our own `validation_failed` is as final as the provider's 409, and both statuses come * from the same structural read (`SubstratError` carries its catalog status; a connector's * error carries the provider's). */ export declare function isTerminalDispatchFailure(error: unknown): boolean; /** * The PROVIDER refused the request — a 4xx that came back over the wire, not one we raised. * * The exclusion is the whole point (#841). This predicate reads a bare numeric `status`, and * every `SubstratError` carries one from the problem catalog — so a `permission denied: * protocol:read` raised on our own side of egress answered `true` here, and the drain * captioned it "a client error the provider will refuse identically on retry". Scrive never * saw that request. An operator who reads that sentence goes and audits their Scrive account. * * Terminality was never the part that was wrong, so it did not move: see * {@link isTerminalDispatchFailure}, which is what the drain now asks. This one answers only * "may we quote this as the provider's words", and one of ours never may. */ export declare function isTerminalProviderError(error: unknown): boolean; //# sourceMappingURL=provider-error.d.ts.map