From 39af83837692031baef2d0b7ed4a057b77247ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 19 Jan 2026 20:59:55 -0500 Subject: [PATCH] fix: #13909, show 413 error properly add tx string --- install/package.json | 2 +- public/language/en-GB/error.json | 1 + public/src/modules/uploadHelpers.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install/package.json b/install/package.json index 3248025468..3fccc1d277 100644 --- a/install/package.json +++ b/install/package.json @@ -97,7 +97,7 @@ "multer": "2.0.2", "nconf": "0.13.0", "nodebb-plugin-2factor": "7.6.1", - "nodebb-plugin-composer-default": "10.3.1", + "nodebb-plugin-composer-default": "10.3.2", "nodebb-plugin-dbsearch": "6.3.5", "nodebb-plugin-emoji": "6.0.5", "nodebb-plugin-emoji-android": "4.1.1", diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json index b32ccfedfb..61231b11a8 100644 --- a/public/language/en-GB/error.json +++ b/public/language/en-GB/error.json @@ -292,6 +292,7 @@ "api.401": "A valid login session was not found. Please log in and try again.", "api.403": "You are not authorised to make this call", "api.404": "Invalid API call", + "api.413": "The request payload is too large", "api.426": "HTTPS is required for requests to the write api, please re-send your request via HTTPS", "api.429": "You have made too many requests, please try again later", "api.500": "An unexpected error was encountered while attempting to service your request.", diff --git a/public/src/modules/uploadHelpers.js b/public/src/modules/uploadHelpers.js index 49ed9fd9fb..a465a44054 100644 --- a/public/src/modules/uploadHelpers.js +++ b/public/src/modules/uploadHelpers.js @@ -181,7 +181,7 @@ define('uploadHelpers', ['alerts'], function (alerts) { '[[error:parse-error]]'; if (xhr && xhr.status === 413) { - errorMsg = xhr.statusText || 'Request Entity Too Large'; + errorMsg = '[[error:api.413]]'; } alerts.error(errorMsg); alerts.remove(alert_id);