mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Prevent NodeApiError rewraping (no-changelog) (#9627)
This commit is contained in:
@@ -113,7 +113,7 @@ const STATUS_CODE_MESSAGES: IStatusCodeMessages = {
|
||||
* with an HTTP error code, an error message and a description.
|
||||
*/
|
||||
export class NodeApiError extends NodeError {
|
||||
httpCode: string | null;
|
||||
httpCode: string | null = null;
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
constructor(
|
||||
@@ -131,6 +131,10 @@ export class NodeApiError extends NodeError {
|
||||
messageMapping,
|
||||
}: NodeApiErrorOptions = {},
|
||||
) {
|
||||
if (errorResponse instanceof NodeApiError) {
|
||||
return errorResponse;
|
||||
}
|
||||
|
||||
super(node, errorResponse);
|
||||
|
||||
this.addToMessages(errorResponse.message as string);
|
||||
|
||||
Reference in New Issue
Block a user