Skip to content

Commit 067a37b

Browse files
committed
fix(no-active-handler): Fixed response code 200 for No Active Handler response
1 parent e78a9cb commit 067a37b

File tree

10 files changed

+131
-109
lines changed

10 files changed

+131
-109
lines changed

data/google-crawlers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"creationTime": "2025-07-09T14:45:58.000000",
2+
"creationTime": "2025-07-15T14:46:35.000000",
33
"prefixes": [
44
{
55
"ipv6Prefix": "2001:4860:4801:2008::/64"

package-lock.json

Lines changed: 44 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"homepage": "https://emailengine.app/",
4242
"dependencies": {
4343
"@bugsnag/js": "8.4.0",
44-
"@bull-board/api": "6.11.0",
45-
"@bull-board/hapi": "6.11.0",
44+
"@bull-board/api": "6.11.1",
45+
"@bull-board/hapi": "6.11.1",
4646
"@elastic/elasticsearch": "8.15.3",
4747
"@hapi/accept": "^6.0.3",
4848
"@hapi/bell": "13.1.0",
@@ -59,9 +59,9 @@
5959
"@postalsys/gettext": "4.1.0",
6060
"@postalsys/joi-messages": "1.0.5",
6161
"@postalsys/templates": "2.0.0",
62-
"ace-builds": "1.43.1",
62+
"ace-builds": "1.43.2",
6363
"base32.js": "0.1.0",
64-
"bullmq": "5.56.3",
64+
"bullmq": "5.56.4",
6565
"compare-versions": "6.1.1",
6666
"dotenv": "17.2.0",
6767
"encoding-japanese": "2.2.0",
@@ -101,7 +101,7 @@
101101
"punycode.js": "2.3.1",
102102
"qrcode": "1.5.4",
103103
"smtp-server": "3.14.0",
104-
"socks": "2.8.5",
104+
"socks": "2.8.6",
105105
"speakeasy": "2.0.0",
106106
"startbootstrap-sb-admin-2": "3.3.7",
107107
"timezones-list": "3.1.0",

sbom.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

server.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,9 @@ logger.info({
255255
});
256256

257257
// Standard response for when no active worker is available
258-
const NO_ACTIVE_HANDLER_RESP = {
259-
error: 'Service temporarily unavailable. Please try again in a moment.',
260-
statusCode: 503,
261-
code: 'WorkerNotAvailable'
262-
};
258+
const NO_ACTIVE_HANDLER_RESP_ERR = new Error('No active handler for requested account. Try again later.');
259+
NO_ACTIVE_HANDLER_RESP_ERR.statusCode = 503;
260+
NO_ACTIVE_HANDLER_RESP_ERR.code = 'WorkerNotAvailable';
263261

264262
// Update check intervals
265263
const UPGRADE_CHECK_TIMEOUT = 1 * 24 * 3600 * 1000; // 24 hours
@@ -2142,7 +2140,7 @@ async function onCommand(worker, message) {
21422140
case 'getAttachment':
21432141
case 'listSignatures': {
21442142
if (!assigned.has(message.account)) {
2145-
return NO_ACTIVE_HANDLER_RESP;
2143+
throw NO_ACTIVE_HANDLER_RESP_ERR;
21462144
}
21472145

21482146
let assignedWorker = assigned.get(message.account);

static/js/ace/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)