UNPKG

channel3-sdk

Version:

The official TypeScript/JavaScript SDK for Channel3 AI Shopping API

51 lines 2.05 kB
"use strict"; /** * Custom error classes for the Channel3 SDK */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Channel3ConnectionError = exports.Channel3ServerError = exports.Channel3NotFoundError = exports.Channel3ValidationError = exports.Channel3AuthenticationError = exports.Channel3Error = void 0; class Channel3Error extends Error { constructor(message, statusCode, responseData) { super(message); this.name = "Channel3Error"; this.statusCode = statusCode; this.responseData = responseData; } } exports.Channel3Error = Channel3Error; class Channel3AuthenticationError extends Channel3Error { constructor(message = "Invalid or missing API key", statusCode, responseData) { super(message, statusCode, responseData); this.name = "Channel3AuthenticationError"; } } exports.Channel3AuthenticationError = Channel3AuthenticationError; class Channel3ValidationError extends Channel3Error { constructor(message, statusCode, responseData) { super(message, statusCode, responseData); this.name = "Channel3ValidationError"; } } exports.Channel3ValidationError = Channel3ValidationError; class Channel3NotFoundError extends Channel3Error { constructor(message, statusCode, responseData) { super(message, statusCode, responseData); this.name = "Channel3NotFoundError"; } } exports.Channel3NotFoundError = Channel3NotFoundError; class Channel3ServerError extends Channel3Error { constructor(message = "Internal server error", statusCode, responseData) { super(message, statusCode, responseData); this.name = "Channel3ServerError"; } } exports.Channel3ServerError = Channel3ServerError; class Channel3ConnectionError extends Channel3Error { constructor(message, statusCode, responseData) { super(message, statusCode, responseData); this.name = "Channel3ConnectionError"; } } exports.Channel3ConnectionError = Channel3ConnectionError; //# sourceMappingURL=exceptions.js.map