n8n-io/n8n · error · NodeOperationError

Bad request - please check your parameters

Error message

Bad request - please check your parameters

What it means

Error-status mapper for ChatVertexAI: the API returned 400, meaning one or more request parameters (model config, safety settings, generation options) are invalid. The raw Google error is attached as the underlying cause for inspection.

Solutions

  1. Review temperature, topK/topP, maxOutputTokens and safety settings for out-of-range values
  2. Read the attached raw error to see which parameter Google rejected
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.ts:226 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/bb5838751ea9a1ca. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.ts:226

				maxOutputTokens: options.maxOutputTokens,
				safetySettings,
				callbacks: [new N8nLlmTracing(this, { errorDescriptionMapper })],
				// Handle ChatVertexAI invocation errors to provide better error messages
				onFailedAttempt: makeN8nLlmFailedAttemptHandler(this, (error: any) => {
					// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
					const status = Number(error?.response?.status);
					const customError = makeErrorFromStatus(status, {
						modelName,
					});

					if (customError) {
						throw new NodeOperationError(this.getNode(), error as JsonObject, customError);
					}

					if (status === 400) {
						// Surface Google's error detail; a bare rethrow would hide it behind a
						// generic "Bad request" wrapper
						throw new NodeOperationError(this.getNode(), error as JsonObject, {
							message: 'Bad request - please check your parameters',
							description:
								extractGoogleErrorMessage(error as { message?: string }) ??
								// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
								(typeof error?.message === 'string' ? (error.message as string) : undefined),
						});
					}

					throw error;
				}),
			};

			// Add thinkingBudget if specified
			if (options.thinkingBudget !== undefined) {
				modelConfig.thinkingBudget = options.thinkingBudget;
			}

			const model = new ChatVertexAI(modelConfig);

View on GitHub (pinned to 5ac6606e81)