Skip to Content

PublicApiErrorOptions

type PublicApiErrorOptions = { [TCode in PublicApiErrorCode]: { code: TCode; message: string; param?: TCode extends "INVALID_REQUEST" ? string : never; reason?: ApiErrorReasonOf<TCode>; requiredPermission?: TCode extends "FORBIDDEN" ? ResourceKindPermission : never; retryAfterSeconds?: TCode extends "RATE_LIMITED" ? number : never } }[PublicApiErrorCode];

A public error’s code, message, and the fields its code allows.

Last updated on