backend: Update error path for roomId in withValidRoomId middleware to improve error reporting

This commit is contained in:
Carlos Santos 2025-04-23 13:48:19 +02:00
parent 9a4237c59d
commit db44b43022

View File

@ -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);
}