fix: wrong format for "log-in expired" response
This commit is contained in:
parent
ea59665a0c
commit
595305081a
@ -3,7 +3,7 @@ import { logger } from "../utils/logger";
|
|||||||
|
|
||||||
export const errorHandler = (err: Error, req: Request, res: Response, _next: NextFunction): void => {
|
export const errorHandler = (err: Error, req: Request, res: Response, _next: NextFunction): void => {
|
||||||
if (err.message == "Invalid accountId-nonce pair") {
|
if (err.message == "Invalid accountId-nonce pair") {
|
||||||
res.status(400).json("Log-in expired");
|
res.status(400).send("Log-in expired");
|
||||||
} else if (err.stack) {
|
} else if (err.stack) {
|
||||||
const stackArr = err.stack.split("\n");
|
const stackArr = err.stack.split("\n");
|
||||||
stackArr[0] += ` while processing ${req.path} request`;
|
stackArr[0] += ` while processing ${req.path} request`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user