mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-23 10:53:07 +00:00
fix: resolve double URL-encoding in datatable filter/sortBy query params (#652)
This commit is contained in:
committed by
GitHub
parent
c5665632af
commit
6f6668acc4
6
dist/utils/n8n-errors.js
vendored
6
dist/utils/n8n-errors.js
vendored
@@ -25,8 +25,8 @@ class N8nAuthenticationError extends N8nApiError {
|
||||
}
|
||||
exports.N8nAuthenticationError = N8nAuthenticationError;
|
||||
class N8nNotFoundError extends N8nApiError {
|
||||
constructor(resource, id) {
|
||||
const message = id ? `${resource} with ID ${id} not found` : `${resource} not found`;
|
||||
constructor(messageOrResource, id) {
|
||||
const message = id ? `${messageOrResource} with ID ${id} not found` : messageOrResource;
|
||||
super(message, 404, 'NOT_FOUND');
|
||||
this.name = 'N8nNotFoundError';
|
||||
}
|
||||
@@ -69,7 +69,7 @@ function handleN8nApiError(error) {
|
||||
case 401:
|
||||
return new N8nAuthenticationError(message);
|
||||
case 404:
|
||||
return new N8nNotFoundError('Resource', message);
|
||||
return new N8nNotFoundError(message || 'Resource');
|
||||
case 400:
|
||||
return new N8nValidationError(message, data);
|
||||
case 429:
|
||||
|
||||
Reference in New Issue
Block a user