Skip to content

Commit

Permalink
refactor: adjusted error response
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandernsilva committed Feb 4, 2025
1 parent bb86b9e commit 0242718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ API.v1.addRoute(
const user = await Users.findOneById(this.userId, { projections: { username: 1 } });

if (!user) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'rooms.close' });
return API.v1.failure('Invalid user');
}

const subscription = await Subscriptions.findOneByRoomIdAndUserId(roomId, this.userId);
Expand Down

0 comments on commit 0242718

Please sign in to comment.