badmfck-api-server 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -262,7 +262,7 @@ class APIService extends BaseService_1.BaseService {
|
|
262
262
|
this.sendResponse(req.get("Referer") ?? "", res, { error: { ...DefaultErrors_1.default.DB_ERROR, details: e.message } }, tme, ep, log, httpRequest);
|
263
263
|
return;
|
264
264
|
}
|
265
|
-
this.sendResponse(req.get("Referer") ?? "", res, { error: { code: 10002, message: "Internal server error", stack: stack, details: details }, data: null, httpStatus: 500 }, tme, ep, log, httpRequest);
|
265
|
+
this.sendResponse(req.get("Referer") ?? "", res, { error: { code: 10002, message: "Internal server error!", stack: stack, details: details }, data: null, httpStatus: 500 }, tme, ep, log, httpRequest);
|
266
266
|
return;
|
267
267
|
}
|
268
268
|
}
|
@@ -371,8 +371,6 @@ class APIService extends BaseService_1.BaseService {
|
|
371
371
|
if (res.destroyed || res.closed) {
|
372
372
|
if (log)
|
373
373
|
log.error = "Connection already closed, can't send response for: " + data.endpoint;
|
374
|
-
if (this.options.onError)
|
375
|
-
this.options.onError("Connection already closed, can't send response: " + data.endpoint, data);
|
376
374
|
}
|
377
375
|
else {
|
378
376
|
try {
|
@@ -17,7 +17,7 @@ class DefaultErrors {
|
|
17
17
|
static DB_ERROR = { code: 11, message: "DB error", httpStatus: 500 };
|
18
18
|
static FORBIDDEN = { code: 12, message: "Forbidden", httpStatus: 403 };
|
19
19
|
static NOT_FOUND = { code: 13, message: "Not found", httpStatus: 404 };
|
20
|
-
static INTERNAL_SERVER_ERROR = { code: 14, message: "Internal server error", httpStatus: 500 };
|
20
|
+
static INTERNAL_SERVER_ERROR = { code: 14, message: "Internal server error.", httpStatus: 500 };
|
21
21
|
static INVALID_TOKEN = { code: 15, message: "Invalid token", httpStatus: 401 };
|
22
22
|
static INVALID_CREDENTIALS = { code: 16, message: "Invalid credentials", httpStatus: 401 };
|
23
23
|
static INVALID_DATA = { code: 17, message: "Invalid data", httpStatus: 422 };
|