Skip to content

Commit

Permalink
caputure specific error
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Nov 10, 2023
1 parent d26686e commit 35e01fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/api/v3/timelines/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ class Api::V3::Timelines::StatusesController < Api::BaseController
before_action :require_mammoth!

rescue_from Mammoth::StatusOrigin::NotFound do |e|
Appsignal.send_error(e) do |transaction|
transaction.set_action('foryou')
transaction.set_namespace('for_you_statuses')
transaction.params = { time: Time.now.utc, status_id: status_id_param, user_account: user_account }
end
render json: { error: e.to_s }, status: 404
end

Expand Down

0 comments on commit 35e01fa

Please sign in to comment.