UNPKG

epo-ops-sdk

Version:

TypeScript SDK for the European Patent Office's Open Patent Services (OPS) API with OAuth support

35 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidationError = exports.RateLimitError = exports.AuthenticationError = exports.EpoOpsError = void 0; class EpoOpsError extends Error { constructor(message, status, code, details) { super(message); this.status = status; this.code = code; this.details = details; this.name = 'EpoOpsError'; } } exports.EpoOpsError = EpoOpsError; class AuthenticationError extends EpoOpsError { constructor(message = 'Authentication failed') { super(message); this.name = 'AuthenticationError'; } } exports.AuthenticationError = AuthenticationError; class RateLimitError extends EpoOpsError { constructor(message = 'Rate limit exceeded') { super(message); this.name = 'RateLimitError'; } } exports.RateLimitError = RateLimitError; class ValidationError extends EpoOpsError { constructor(message = 'Invalid input') { super(message); this.name = 'ValidationError'; } } exports.ValidationError = ValidationError; //# sourceMappingURL=errors.js.map