@unkey/api
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.
55 lines • 2.9 kB
TypeScript
import * as z from "zod/v3";
import * as components from "../components/index.js";
import { UnkeyError } from "./unkeyerror.js";
/**
* Error response when the client has sent too many requests in a given time period. This occurs when you've exceeded a rate limit or quota for the resource you're accessing.
*
* @remarks
*
* The rate limit resets automatically after the time window expires. To avoid this error:
* - Implement exponential backoff when retrying requests
* - Cache results where appropriate to reduce request frequency
* - Check the error detail message for specific quota information
* - Contact support if you need a higher quota for your use case
*/
export type TooManyRequestsErrorResponseData = {
/**
* Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
*/
meta: components.Meta;
/**
* Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
*/
error: components.BaseError;
};
/**
* Error response when the client has sent too many requests in a given time period. This occurs when you've exceeded a rate limit or quota for the resource you're accessing.
*
* @remarks
*
* The rate limit resets automatically after the time window expires. To avoid this error:
* - Implement exponential backoff when retrying requests
* - Cache results where appropriate to reduce request frequency
* - Check the error detail message for specific quota information
* - Contact support if you need a higher quota for your use case
*/
export declare class TooManyRequestsErrorResponse extends UnkeyError {
/**
* Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
*/
meta: components.Meta;
/**
* Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
*/
error: components.BaseError;
/** The original data that was passed to this error instance. */
data$: TooManyRequestsErrorResponseData;
constructor(err: TooManyRequestsErrorResponseData, httpMeta: {
response: Response;
request: Request;
body: string;
});
}
/** @internal */
export declare const TooManyRequestsErrorResponse$inboundSchema: z.ZodType<TooManyRequestsErrorResponse, z.ZodTypeDef, unknown>;
//# sourceMappingURL=toomanyrequestserrorresponse.d.ts.map