cs2-inspect-lib
Version:
Enhanced CS2 Inspect URL library with full protobuf support, validation, and error handling
91 lines • 2.99 kB
TypeScript
/**
* Custom error classes for CS2 Inspect URL library
*/
export declare enum ErrorCode {
INVALID_INPUT = "INVALID_INPUT",
ENCODING_ERROR = "ENCODING_ERROR",
DECODING_ERROR = "DECODING_ERROR",
VALIDATION_ERROR = "VALIDATION_ERROR",
BUFFER_OVERFLOW = "BUFFER_OVERFLOW",
INVALID_URL_FORMAT = "INVALID_URL_FORMAT",
UNSUPPORTED_FIELD = "UNSUPPORTED_FIELD",
STEAM_CONNECTION_ERROR = "STEAM_CONNECTION_ERROR",
STEAM_AUTHENTICATION_ERROR = "STEAM_AUTHENTICATION_ERROR",
STEAM_TIMEOUT_ERROR = "STEAM_TIMEOUT_ERROR",
STEAM_QUEUE_FULL_ERROR = "STEAM_QUEUE_FULL_ERROR",
STEAM_NOT_READY_ERROR = "STEAM_NOT_READY_ERROR",
STEAM_INSPECTION_ERROR = "STEAM_INSPECTION_ERROR"
}
/**
* Base error class for all CS2 Inspect URL related errors
*/
export declare class CS2InspectError extends Error {
readonly code: ErrorCode;
readonly context?: Record<string, any>;
constructor(message: string, code: ErrorCode, context?: Record<string, any>);
/**
* Returns a detailed error message including context
*/
getDetailedMessage(): string;
}
/**
* Error thrown when input validation fails
*/
export declare class ValidationError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when encoding fails
*/
export declare class EncodingError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when decoding fails
*/
export declare class DecodingError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when URL format is invalid
*/
export declare class InvalidUrlError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam client connection fails
*/
export declare class SteamConnectionError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam authentication fails
*/
export declare class SteamAuthenticationError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam operations timeout
*/
export declare class SteamTimeoutError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam inspection queue is full
*/
export declare class SteamQueueFullError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam client is not ready
*/
export declare class SteamNotReadyError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
/**
* Error thrown when Steam item inspection fails
*/
export declare class SteamInspectionError extends CS2InspectError {
constructor(message: string, context?: Record<string, any>);
}
//# sourceMappingURL=errors.d.ts.map