Skip to content

Commit

Permalink
add sentry logging for upload documents to ce (#20405)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Hoang <[email protected]>
  • Loading branch information
jonathanh-va and Jonathan Hoang authored Jan 3, 2024
1 parent a09fe3e commit 5ac9ff7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/controllers/correspondence_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def review_package
render "correspondence/review_package"
end

# rubocop:disable Metrics/MethodLength
def intake_update
tasks = Task.where("appeal_id = ? and appeal_type = ?", correspondence.id, "Correspondence")
begin
Expand All @@ -63,16 +64,18 @@ def intake_update
task.status = "cancelled"
task.save
end
if correspondence_intake_processor.upload_documents_to_claim_evidence(correspondence, current_user)
if upload_documents_to_claim_evidence
render json: { correspondence: correspondence }
else
render json: {}, status: bad_request
render json: {}, status: :bad_request
end
rescue StandardError => error
Rails.logger.error(error.to_s)
render json: {}, status: bad_request
Raven.capture_exception(error)
render json: {}, status: :bad_request
end
end
# rubocop:enable Metrics/MethodLength

def veteran
render json: { veteran_id: veteran_by_correspondence&.id, file_number: veteran_by_correspondence&.file_number }
Expand Down

0 comments on commit 5ac9ff7

Please sign in to comment.