Skip to content

Commit

Permalink
fix(server/messages): log error when conversation message fails
Browse files Browse the repository at this point in the history
could be that it doesn't log the on in the controller, i guess
  • Loading branch information
itschip committed Apr 23, 2022
1 parent f6aa76c commit a4e4ae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/server/messages/messages.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ onNetPromise<PreDBConversation, MessageConversation>(
async (reqObj, resp) => {
MessagesService.handleCreateMessageConversation(reqObj, resp).catch((e) => {
messagesLogger.error(
`Error occurred on creating messsage converations (${reqObj.source}), Error: ${e.message}`,
`Error occurred on creating message conversation (${reqObj.source}), Error: ${e.message}`,
);
resp({ status: 'error', errorMsg: 'INTERNAL_ERROR' });
});
Expand Down
3 changes: 3 additions & 0 deletions resources/server/messages/messages.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class _MessagesService {
}
}
} catch (err) {
messagesLogger.error(
`Error occurred on creating message conversation (${reqObj.source}), Error: ${err.message}`,
);
resp({ status: 'error', errorMsg: err.message });
}
}
Expand Down

0 comments on commit a4e4ae4

Please sign in to comment.