backend: Update error path for roomId in withValidRoomId middleware to improve error reporting
This commit is contained in:
parent
9a4237c59d
commit
db44b43022
@ -195,6 +195,7 @@ export const withValidRoomId = (req: Request, res: Response, next: NextFunction)
|
||||
const { success, error, data } = nonEmptySanitizedRoomId('roomId').safeParse(req.params.roomId);
|
||||
|
||||
if (!success) {
|
||||
error.errors[0].path = ['roomId'];
|
||||
return rejectRequest(res, error);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user