diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index 894e751c9..a1ce7d175 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -160,7 +160,8 @@ export function doCommentById(commentId: string, toastIfNotFound: boolean = true return result; }) .catch((error) => { - if (error.message === 'sql: no rows in result set' && toastIfNotFound) { + const ID_NOT_FOUND_REGEX = /^comment for id (.*) could not be found$/; + if (ID_NOT_FOUND_REGEX.test(error.message) && toastIfNotFound) { dispatch( doToast({ isError: true,