• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tulibraries / tul_cob / e5aaf953-596d-4ace-ba41-543a79ba54b7

09 Jan 2025 04:09PM UTC coverage: 85.98% (-0.02%) from 86.0%
e5aaf953-596d-4ace-ba41-543a79ba54b7

push

circleci

web-flow
Merge pull request #4851 from tulibraries/add-recaptcha-specific-error

Use recaptcha specific error for verification errors.

1 of 3 new or added lines in 2 files covered. (33.33%)

3097 of 3602 relevant lines covered (85.98%)

64.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.95
/app/controllers/concerns/server_errors.rb
1
# frozen_string_literal: true
2

3
module ServerErrors
1✔
4
  extend ActiveSupport::Concern
1✔
5

6
  included do
1✔
7
    next if Rails.env == "development"
2✔
8

9
    # We handle all unknown and unplanned exceptions here
10
    # If an exception arises that could benefit from more
11
    # detailed notification to end user or Honeybadger
12
    # consider writing a custom handler below.
13
    rescue_from Exception do |exception|
2✔
14
      Honeybadger.notify(exception)
2✔
15
      render "errors/internal_server_error", status: :internal_server_error
2✔
16
    end
17

18
    rescue_from BlacklightRangeLimit::InvalidRange do
2✔
19
      redirect_back(fallback_location: root_path, notice: "The start year must be before the end year.")
×
20
    end
21

22
    rescue_from Blacklight::Exceptions::RecordNotFound,
2✔
23
                with: :invalid_document_id_error
24

25
    rescue_from Blacklight::Exceptions::InvalidRequest do |exception|
2✔
26
      Honeybadger.notify(exception.message)
×
27
      render "errors/unsupported_query", status: :bad_request
×
28
    end
29

30
    rescue_from Primo::Search::SearchError do |exception|
2✔
31
      Honeybadger.notify(exception)
1✔
32
      render "errors/internal_server_error", status: :bad_gateway
1✔
33
    end
34

35
    rescue_from Recaptcha::VerifyError do |exception|
2✔
NEW
36
      render "errors/internal_server_error", status: :bad_gateway
×
37
    end
38

39
    rescue_from Alma::RequestOptions::ResponseError do |exception|
2✔
40
      Honeybadger.notify(exception)
2✔
41
      render "errors/alma_request_error", status: :bad_gateway
2✔
42
    end
43
  end
44
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc