From 06098464b0965353ce0d386278e04328d2f60074 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Wed, 3 Dec 2025 11:05:48 +0100 Subject: [PATCH] Fix n8n always in success mode Signed-off-by: Bryan Frimin --- packages/n8n-node/nodes/Probo/GenericFunctions.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/n8n-node/nodes/Probo/GenericFunctions.ts b/packages/n8n-node/nodes/Probo/GenericFunctions.ts index d6248b0ab..842befb45 100644 --- a/packages/n8n-node/nodes/Probo/GenericFunctions.ts +++ b/packages/n8n-node/nodes/Probo/GenericFunctions.ts @@ -34,7 +34,19 @@ export async function proboApiRequest( }; try { - return await this.helpers.httpRequest(options); + const response = await this.helpers.httpRequest(options); + + if (response.errors && Array.isArray(response.errors) && response.errors.length > 0) { + const errorMessages = response.errors.map((err: IDataObject) => + err.message || JSON.stringify(err) + ).join('; '); + throw new NodeApiError(this.getNode(), { + message: `GraphQL errors: ${errorMessages}`, + httpCode: '200', + } as JsonObject); + } + + return response; } catch (error) { throw new NodeApiError(this.getNode(), error as JsonObject); }