UNPKG

@orga-ai/node

Version:

OrgaAI backend SDK for Node.js - simplifies API integration

27 lines 898 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OrgaAIServerError = exports.OrgaAIAuthenticationError = exports.OrgaAIError = void 0; class OrgaAIError extends Error { status; code; constructor(message, status, code) { super(message); this.name = 'OrgaAIError'; this.status = status; this.code = code; } } exports.OrgaAIError = OrgaAIError; class OrgaAIAuthenticationError extends OrgaAIError { constructor(message = 'Authentication failed') { super(message, 401, 'AUTHENTICATION_ERROR'); } } exports.OrgaAIAuthenticationError = OrgaAIAuthenticationError; class OrgaAIServerError extends OrgaAIError { constructor(message = 'Server error', status = 500) { super(message, status, 'SERVER_ERROR'); } } exports.OrgaAIServerError = OrgaAIServerError; //# sourceMappingURL=errors.js.map