@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
23 lines (22 loc) • 626 B
JavaScript
export class NeuroLinkFeatureError extends Error {
code;
feature;
retryable;
details;
cause;
constructor(message, code, feature, options) {
super(message);
this.name = `${feature}Error`;
this.code = code;
this.feature = feature;
this.retryable = options?.retryable ?? false;
this.details = options?.details;
this.cause = options?.cause;
}
}
export function createErrorFactory(feature, codes) {
return {
codes,
create: (code, message, options) => new NeuroLinkFeatureError(message, codes[code], feature, options),
};
}