Skip to content

Commit

Permalink
Feat(#501): chat room not found exception
Browse files Browse the repository at this point in the history
  • Loading branch information
j-zzi committed May 13, 2024
1 parent 7b9bed2 commit 6a36568
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/chats/services/chats.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export class ChatsService {
roomObjectId,
);

if (!chatRoom) {
throw new NotFoundException('ChatRoom was not found', 'NotFoundChatRoom');
}

const userParticipation = chatRoom.user.participation;
const lecturerParticipation = chatRoom.lecturer.participation;

Expand Down

0 comments on commit 6a36568

Please sign in to comment.