Tracking v4 matrixPatronRequestResolutionStateTransition Exception Handling
PatronRequestResolutionService
Given the PatronRequestResolutionService attempts to getResolutionStrategyBy
When a Resolution Strategy couldn’t be found by code
Then DCB throws a RuntimeException :
RuntimeException("No resolver with code " + code)
Given the PatronRequestResolutionService attempts to getAvailableItems
When a NoBibsForClusterRecordException is caught
Then DCB throws UnableToResolvePatronRequest :
UnableToResolvePatronRequest(error.getMessage())
Given the PatronRequestResolutionService attempts to filterItems
Then DCB throws NoHomeIdentityException :
NoHomeIdentityException(getValueOrNull(patron, Patron::getId), getValueOrNull(patron, Patron::getPatronIdentities))
Given the PatronRequestResolutionService attempts to validateManualSelectionFor
When either of the required fields for manual selection are null
Then throw IllegalArgumentException :
IllegalArgumentException("REQUIRED_FIELD_NAME is required for manual item selection")
Given the LiveAvailabilityService attempts to checkAvailability
When the return chain completes with empty
Then throw RuntimeException :
RuntimeException("Failed to resolve items for cluster record " + clusteredBibId)
Given the LiveAvailabilityService attempts to getClusterMembers
When the return chain completes with empty
Then throw NoBibsForClusterRecordException :
NoBibsForClusterRecordException(clusteredBibId)
Given the
SharedIndexServiceattempts to getSelectedBibWhen the return chain completes with empty
Then throw CannotFindSelectedBibException :
CannotFindSelectedBibException(clusterRecord)
Given the
SharedIndexServiceattempts to findClusterRecordWhen the return chain completes with empty
Then throw CannotFindClusterRecordException :
CannotFindClusterRecordException(clusterRecordId)
Addition notes:
Error reports are produced as part of this transition error handling