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

curationexperts / laevigata / 9e325a69-d6eb-4059-8a6f-9b6c6712d0f0

16 Jul 2026 11:36PM UTC coverage: 97.476% (+0.03%) from 97.443%
9e325a69-d6eb-4059-8a6f-9b6c6712d0f0

Pull #2538

circleci

mark-dce
Add formatted 404 Not Found page for bad Collection and Adminset IDs

**ISSUE**
Invalid AdminSet or Collection IDs in URLs triggered an
ActiveFedora::ObjectNotFoundError exception which was not being
handled explicity by the application, so we were getting the
default Rails 404 page.

**RESOLUTION**
Add the ActiveFedora execption to the existing exception handling
for similar Blacklight (Solr) not-found errors.

This change also adds tests for the relevant error handling.
Pull Request #2538: Add formatted 404 Not Found page for bad Collection and Adminset IDs

2 of 2 new or added lines in 2 files covered. (100.0%)

313 existing lines in 39 files now uncovered.

2781 of 2853 relevant lines covered (97.48%)

49.92 hits per line

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

100.0
/app/validators/my_program_validator.rb
1
class MyProgramValidator < ActiveModel::Validator
4✔
2
  def validate(record)
4✔
3
    return unless record.current_tab == "My Program"
101✔
UNCOV
4
    fields_to_validate = ::Hyrax::EtdForm.my_program_terms - [:partnering_agency]
3✔
UNCOV
5
    fields_to_validate.each do |field|
3✔
UNCOV
6
      next if field == :subfield # Subfields are not currently required
12✔
UNCOV
7
      record.errors.add(field, "#{field} is required") if record.data[field.to_s].blank?
9✔
8
    end
9
  end
10
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc