Tracking v4 matrixPatronRequestResolutionStateTransition Exception Handling

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 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 SharedIndexService attempts to getSelectedBib

  • When the return chain completes with empty

  • Then throw CannotFindSelectedBibException :

    CannotFindSelectedBibException(clusterRecord)

 

  • Given the SharedIndexService attempts to findClusterRecord

  • When the return chain completes with empty

  • Then throw CannotFindClusterRecordException :

    CannotFindClusterRecordException(clusterRecordId)

 

Addition notes:

  • Error reports are produced as part of this transition error handling

Operated as a Community Resource by the Open Library Foundation