fix: Handle application errors in Sentry (#1982)

- Handle notification errors for attachment messages
- Fix empty identifiers being passed
- Fix 404 when invalid source id
- Handle webhook exceptions
This commit is contained in:
Sojan Jose
2021-03-27 12:27:48 +05:30
committed by GitHub
parent 9903e47896
commit c453455ad1
8 changed files with 43 additions and 6 deletions

View File

@@ -32,7 +32,8 @@ class Api::V1::Widget::BaseController < ApplicationController
@contact_inbox = @web_widget.inbox.contact_inboxes.find_by(
source_id: auth_token_params[:source_id]
)
@contact = @contact_inbox.contact
@contact = @contact_inbox&.contact
raise ActiveRecord::RecordNotFound unless @contact
end
def create_conversation