UNPKG

@realitydefender/realitydefender

Version:

SDK for the Reality Defender API for deepfake detection

37 lines (36 loc) 880 B
/** * Error types and classes for the Reality Defender SDK */ /** * Error codes returned by the SDK */ export type ErrorCode = /** Invalid or missing API key */ 'unauthorized' /** Server-side error occurred */ | 'server_error' /** Operation timed out */ | 'timeout' /** File not found or invalid format */ | 'invalid_file' /** Failed to upload the file */ | 'upload_failed' /** Requested resource not found */ | 'not_found' /** Unexpected error */ | 'unknown_error'; /** * Custom error class for Reality Defender SDK errors */ export declare class RealityDefenderError extends Error { /** * Error code indicating the type of error */ code: ErrorCode; /** * Creates a new SDK error * @param message Human-readable error message * @param code Machine-readable error code */ constructor(message: string, code: ErrorCode); }