From 86e48fac8b4e52bc7b49a18621f90bb881f1a94c Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Tue, 4 Feb 2025 12:27:08 -0300 Subject: [PATCH] refactor: changed error messages to follow error-xxxx pattern --- apps/meteor/app/api/server/v1/rooms.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/meteor/app/api/server/v1/rooms.ts b/apps/meteor/app/api/server/v1/rooms.ts index 6f8b5017a875..7af4c6cbc83a 100644 --- a/apps/meteor/app/api/server/v1/rooms.ts +++ b/apps/meteor/app/api/server/v1/rooms.ts @@ -979,17 +979,17 @@ API.v1.addRoute( const user = await Users.findOneById(this.userId, { projections: { username: 1 } }); if (!user) { - return API.v1.failure('Invalid user'); + return API.v1.failure('error-invalid-user'); } const subscription = await Subscriptions.findOneByRoomIdAndUserId(roomId, this.userId); if (!subscription) { - return API.v1.failure(`The user is not subscribed to the room`); + return API.v1.failure(`error-invalid-subscription`); } if (!subscription.open) { - return API.v1.failure(`The room, ${subscription.name}, is already closed`); + return API.v1.failure('error-room-already-closed'); } await hideRoomMethod(this.userId, roomId);