@volley/recognition-client-sdk
Version:
Recognition Service TypeScript/Node.js Client SDK
41 lines • 1.39 kB
TypeScript
/**
* SDK Error Classes
*
* Typed error classes that extend native Error with recognition-specific metadata
*/
import { ErrorTypeV1 } from '@recog/shared-types';
/**
* Base class for all recognition SDK errors
*/
export declare class RecognitionError extends Error {
readonly errorType: ErrorTypeV1;
readonly timestamp: number;
constructor(errorType: ErrorTypeV1, message: string);
}
/**
* Connection error - thrown when WebSocket connection fails after all retry attempts
*/
export declare class ConnectionError extends RecognitionError {
readonly attempts: number;
readonly url: string;
readonly underlyingError?: Error;
constructor(message: string, attempts: number, url: string, underlyingError?: Error);
}
/**
* Timeout error - thrown when operations exceed timeout limits
*/
export declare class TimeoutError extends RecognitionError {
readonly timeoutMs: number;
readonly operation: string;
constructor(message: string, timeoutMs: number, operation: string);
}
/**
* Validation error - thrown when invalid configuration or input is provided
*/
export declare class ValidationError extends RecognitionError {
readonly field?: string;
readonly expected?: string;
readonly received?: string;
constructor(message: string, field?: string, expected?: string, received?: string);
}
//# sourceMappingURL=errors.d.ts.map