mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-29 11:49:24 +00:00
minor cleanup
This commit is contained in:
@@ -50,7 +50,7 @@ export function ErrorHandler(error: Error & { type?: string }, req: Request, res
|
||||
code = 50109;
|
||||
message = "The request body contains invalid JSON.";
|
||||
} else {
|
||||
console.error(`[Error] ${code} ${req.url}\n`, errors || error, "\nbody:", req.body);
|
||||
console.error(`[Error] ${code} ${req.url}\n`, errors, "\nbody:", req.body);
|
||||
|
||||
if (req.server?.options?.production) {
|
||||
// don't expose internal errors to the user, instead human errors should be thrown as HTTPError
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, FieldErrors, Member, Message, Snowflake, getPermission } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
Reference in New Issue
Block a user