@letanure/resend-cli
Version:
A command-line interface for Resend email API
21 lines • 723 B
TypeScript
import type { ErrorResponse } from 'resend';
/**
* Resend API error types and handling
* Based on official Resend documentation
*/
/**
* Resend's official error types plus our custom fallback
*/
export type ResendErrorType = ErrorResponse['name'] | 'unknown_error';
export interface ResendErrorInfo {
status: number;
type: ResendErrorType;
message: string;
suggestion: string;
}
export declare const RESEND_ERROR_CODES: Record<ResendErrorType, ResendErrorInfo>;
/**
* Formats a user-friendly error message from Resend error response
*/
export declare function formatResendError(error: ErrorResponse | unknown, action: string, requestData?: unknown): string;
//# sourceMappingURL=resendErrors.d.ts.map