Closed carolyncole closed 6 years ago
It seems that if you have old proxies where the item no longer exists you get a very strange error about model miss match. Once I deleted my proxy deposit request all was well. That said we should look at how those request are being migrated and make sure they work.
Handle any StandardException (Runtime or Other) instead of erroring
Steps to recreate:
@awead was there a change to handle the error? Or did we decide not to handle the error? What makes this ticket closed?
@cam156 I've rescued the error here:
If you recall, there's a PR that's ready to merge that addresses this, but we decided to hold off on merging because we're overriding an entire class to make a one-line change, and the error will not occur in the normal course of operations, only when migrating.
@awead I moved the ticket to the next milestone. I had forgotten to do that earlier.
@cam156 thanks!
New Note 4
2016-11-17 11:53:53 -0500 (30460) ActiveFedora::ActiveFedoraError (Model mismatch. Expected CurationConcerns::WorkRelation::DummyModel. Got: FileSet):
active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:204:in
class_to_load' active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:195:in
load_from_fedora'active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:181:in
find_one' active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:228:in
find_with_ids'active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:52:in
find' active-fedora (10.3.0.rc2) lib/active_fedora/relation/finder_methods.rb:85:in
exists?'/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/bundler/gems/sufia-35c01618b4d3/app/models/proxy_deposit_request.rb:83:in `deleted_work?'