mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.ValidationServiceError = void 0;
|
|
class ValidationServiceError extends Error {
|
|
constructor(message, nodeType, property, cause) {
|
|
super(message);
|
|
this.nodeType = nodeType;
|
|
this.property = property;
|
|
this.cause = cause;
|
|
this.name = 'ValidationServiceError';
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, ValidationServiceError);
|
|
}
|
|
}
|
|
static jsonParseError(nodeType, cause) {
|
|
return new ValidationServiceError(`Failed to parse JSON data for node ${nodeType}`, nodeType, undefined, cause);
|
|
}
|
|
static nodeNotFound(nodeType) {
|
|
return new ValidationServiceError(`Node type ${nodeType} not found in repository`, nodeType);
|
|
}
|
|
static dataExtractionError(nodeType, dataType, cause) {
|
|
return new ValidationServiceError(`Failed to extract ${dataType} for node ${nodeType}`, nodeType, dataType, cause);
|
|
}
|
|
}
|
|
exports.ValidationServiceError = ValidationServiceError;
|
|
//# sourceMappingURL=validation-service-error.js.map
|