Skip to content

Commit 93fd48a

Browse files
committed
refactored AlmaRecordNotFoundError rescue
1 parent 51c2d18 commit 93fd48a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/models/alma/user.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def find_if_active(id)
4343
return nil unless rec && rec.active?
4444
end
4545
rescue Error::AlmaRecordNotFoundError => e
46-
return if e.message == '400'
47-
return if e.message == '404'
46+
return if %w[400 404].include? e.message
4847

4948
raise
5049
end

0 commit comments

Comments
 (0)