Skip to content

Commit 861d461

Browse files
fix: solve invalid statement rescue issue
1 parent 305f289 commit 861d461

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/controllers/api/v1/base_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ class BaseController < ApplicationController
4242
# Add trial warning headers to all responses
4343
after_action :add_trial_warning_headers, if: -> { current_organization.present? }
4444

45+
rescue_from StandardError, with: :render_internal_error
4546
rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
47+
rescue_from ActiveRecord::StatementInvalid, with: :render_not_found
4648
rescue_from ActiveRecord::RecordInvalid, with: :render_validation_errors
4749
rescue_from ActionController::ParameterMissing, with: :render_parameter_missing
4850
rescue_from Pundit::NotAuthorizedError, with: :render_forbidden_policy
49-
rescue_from StandardError, with: :render_internal_error
5051

5152
protected
5253

0 commit comments

Comments
 (0)