Skip to content

Commit

Permalink
Treat invalid room IDs as code 4004
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 28, 2024
1 parent d462d4a commit fa96ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ wss.on('connection', (ws, req) => {
isHandshaking = true;
if (!validators.isValidRoomID(roomId)) {
const roomToLog = `${roomId}`.substr(0, 100);
throw new ConnectionError(ConnectionError.Error, 'Invalid room ID: ' + roomToLog);
throw new ConnectionError(ConnectionError.ProjectUnavailable, 'Invalid room ID: ' + roomToLog);
}
if (isProjectBlocked(roomId)) {
throw new ConnectionError(ConnectionError.ProjectUnavailable, 'Project blocked: ' + roomId);
Expand Down

0 comments on commit fa96ac4

Please sign in to comment.