"use strict";
var import_vitest = require("vitest");
var import_exceptions = require("./_exceptions.cjs");
(0, import_vitest.describe)("APIStatusError retryability defaults", () => {
  (0, import_vitest.it)("treats 408 as retryable by default", () => {
    const error = new import_exceptions.APIStatusError({
      message: "timeout",
      options: { statusCode: 408 }
    });
    (0, import_vitest.expect)(error.retryable).toBe(true);
  });
  (0, import_vitest.it)("treats 429 as retryable by default", () => {
    const error = new import_exceptions.APIStatusError({
      message: "rate limited",
      options: { statusCode: 429 }
    });
    (0, import_vitest.expect)(error.retryable).toBe(true);
  });
  (0, import_vitest.it)("keeps other 4xx responses non-retryable by default", () => {
    const error = new import_exceptions.APIStatusError({
      message: "not found",
      options: { statusCode: 404 }
    });
    (0, import_vitest.expect)(error.retryable).toBe(false);
  });
  (0, import_vitest.it)("respects explicit retryable override", () => {
    const forceRetryable = new import_exceptions.APIStatusError({
      message: "force retry",
      options: { statusCode: 500, retryable: true }
    });
    const forceNonRetryable = new import_exceptions.APIStatusError({
      message: "force no retry",
      options: { statusCode: 429, retryable: false }
    });
    (0, import_vitest.expect)(forceRetryable.retryable).toBe(true);
    (0, import_vitest.expect)(forceNonRetryable.retryable).toBe(false);
  });
});
//# sourceMappingURL=_exceptions.test.cjs.map