Skip to content

Commit 30c53c5

Browse files
committed
Rename close code 4401
1 parent 843d779 commit 30c53c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/modules/server/api/websocket.gateway.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class WebsocketGateway implements OnModuleInit, OnModuleDestroy {
169169
const user = ws.getUserData();
170170

171171
if (!user.hasWriteAccess || !user.room) {
172-
ws.end(WebSocketCloseCode.TldrawPolicyViolation, 'User has no write access or room is missing');
172+
ws.end(WebSocketCloseCode.Unauthorized, 'User has no write access or room is missing');
173173

174174
return;
175175
}

src/shared/type/webSocketCloseCode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
export enum WebSocketCloseCode {
33
InternalError = 1011,
44
PolicyViolation = 1008,
5-
TldrawPolicyViolation = 4401,
5+
Unauthorized = 4401,
66
TldrawInternalError = 4500,
77
}

0 commit comments

Comments
 (0)