From 0f6ffed84066378cbc6bde313acab024e25b61eb Mon Sep 17 00:00:00 2001 From: Mariya Yordanova Date: Mon, 9 Feb 2026 11:47:18 +0100 Subject: [PATCH 1/3] added troubleshooting for 431 --- get-started/get-help.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/get-started/get-help.md b/get-started/get-help.md index 81e508f39f..f1446e927c 100644 --- a/get-started/get-help.md +++ b/get-started/get-help.md @@ -166,6 +166,13 @@ Ensure that database transactions are either committed or rolled back. This can If you're using [@sap/hana-client](https://www.npmjs.com/package/@sap/hana-client), verify that the environment variable [`HDB_NODEJS_THREADPOOL_SIZE`](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/31a8c93a574b4f8fb6a8366d2c758f21.html?version=2.11) is adjusted appropriately. This variable specifies the amount of workers that concurrently execute asynchronous method calls for different connections. +### Why are requests rejected with `431` and not logged? + +| | Explanation | +|--------------|----------------------------------------------------------------------------------------------------------------------| +| _Root Cause_ | `431` occurs when the size of the request headers exceeds the maximum limit configured in the Node.js HTTP server. In this case, Node.js rejects the request during the initial parsing phase, before it reaches the application, middleware, or logging logic. Therefore, the request is not processed or logged by the application. | +| _Solution_ | Inspect the request headers and check their size, especially the Authorization header for large `JWT` tokens. Reduce the header size if possible (for example, by removing unnecessary roles or attributes). If large headers are required and cannot be reduced, increase the maximum allowed HTTP header size in Node.js by setting the following environment variable `NODE_OPTIONS="--max-http-header-size=65536"` | + ### Why are requests rejected with `502`? From 69d183f04283804a05bc76025e0410ef14655945 Mon Sep 17 00:00:00 2001 From: mariayord Date: Tue, 10 Feb 2026 15:37:02 +0100 Subject: [PATCH 2/3] Update get-started/get-help.md Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com> --- get-started/get-help.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/get-help.md b/get-started/get-help.md index f1446e927c..b2f80433ae 100644 --- a/get-started/get-help.md +++ b/get-started/get-help.md @@ -170,7 +170,7 @@ If you're using [@sap/hana-client](https://www.npmjs.com/package/@sap/hana-clien | | Explanation | |--------------|----------------------------------------------------------------------------------------------------------------------| -| _Root Cause_ | `431` occurs when the size of the request headers exceeds the maximum limit configured in the Node.js HTTP server. In this case, Node.js rejects the request during the initial parsing phase, before it reaches the application, middleware, or logging logic. Therefore, the request is not processed or logged by the application. | +| _Root Cause_ | `431` occurs when the size of the request headers exceeds the maximum limit configured in the Node.js HTTP server. In this case, the Node.js HTTP server rejects the request during the initial parsing phase before it reaches CAP. Therefore, the request is not logged by the application. | | _Solution_ | Inspect the request headers and check their size, especially the Authorization header for large `JWT` tokens. Reduce the header size if possible (for example, by removing unnecessary roles or attributes). If large headers are required and cannot be reduced, increase the maximum allowed HTTP header size in Node.js by setting the following environment variable `NODE_OPTIONS="--max-http-header-size=65536"` | From 53546b8415484b9590baa8a4885b65c3c7f7786c Mon Sep 17 00:00:00 2001 From: mariayord Date: Tue, 10 Feb 2026 15:39:12 +0100 Subject: [PATCH 3/3] Rework comments --- get-started/get-help.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/get-help.md b/get-started/get-help.md index b2f80433ae..517febd3f4 100644 --- a/get-started/get-help.md +++ b/get-started/get-help.md @@ -171,7 +171,7 @@ If you're using [@sap/hana-client](https://www.npmjs.com/package/@sap/hana-clien | | Explanation | |--------------|----------------------------------------------------------------------------------------------------------------------| | _Root Cause_ | `431` occurs when the size of the request headers exceeds the maximum limit configured in the Node.js HTTP server. In this case, the Node.js HTTP server rejects the request during the initial parsing phase before it reaches CAP. Therefore, the request is not logged by the application. | -| _Solution_ | Inspect the request headers and check their size, especially the Authorization header for large `JWT` tokens. Reduce the header size if possible (for example, by removing unnecessary roles or attributes). If large headers are required and cannot be reduced, increase the maximum allowed HTTP header size in Node.js by setting the following environment variable `NODE_OPTIONS="--max-http-header-size=65536"` | +| _Solution_ | Inspect the request headers and check their size. If large headers are required and cannot be reduced, increase the maximum allowed HTTP header size in Node.js by setting the following environment variable `NODE_OPTIONS="--max-http-header-size=65536"` | ### Why are requests rejected with `502`?