🐛 Remove circular references from error objects (#1802)
* ⚡ Add circular references removal * 🔥 Remove unused flag from affected node * 🔥 Remove unused exports * 🔨 refactor removing circular references * ⚡ Replace IRawErrorObject with JsonObject * ⚡ Make error detection depth-first (#1800) * 👕 fix type * 🔨 improve readability * 📝 improve placeholder for circular reference * ⚡ Turn marker into object to keep description Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
@@ -95,7 +96,7 @@ export class Discord implements INodeType {
|
||||
} while (--maxTries);
|
||||
|
||||
if (maxTries <= 0) {
|
||||
throw new NodeApiError(this.getNode(), { request: options }, { message: 'Could not send message. Max. amount of rate-limit retries got reached.' });
|
||||
throw new NodeApiError(this.getNode(), { request: options } as JsonObject, { message: 'Could not send message. Max. amount of rate-limit retries got reached.' });
|
||||
}
|
||||
|
||||
returnData.push({success: true});
|
||||
|
||||
Reference in New Issue
Block a user