MCPcopy Create free account
hub / github.com/PSPDFKit/nutrient-document-engine-mcp-server / DocumentEngineError

Class DocumentEngineError

src/utils/ErrorHandling.ts:3–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import axios from 'axios';
2
3export class DocumentEngineError extends Error {
4 public readonly code: string;
5 public readonly statusCode?: number;
6 public readonly details?: unknown;
7
8 constructor(message: string, code: string, statusCode?: number, details?: unknown) {
9 super(message);
10 this.name = 'DocumentEngineError';
11 this.code = code;
12 this.statusCode = statusCode;
13 this.details = details;
14 }
15}
16
17export function handleApiError(error: unknown): never {
18 if (axios.isAxiosError(error)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected