PlacePatronRequestAtSupplyingAgencyStateTransition Exception Handling

  • Given the SupplierAgencyService calls requestWorkflowContextHelper

  • When a decorator call fails

  • Then DCB throws a RuntimeException :

    RuntimeException("No agency found for pickup location: %s".formatted(pickupSymbol)
RuntimeException("RWCH No mapping found for pickup location \""+pickupSymbolContext+":"+pickupSymbol+"\"")
RuntimeException("No agency found for pickup location: %s:%s".formatted(pickupSymbolContext,pickupSymbol)

 

  • Given the SupplierAgencyService calls placeRequestAtSupplier

  • When validating that the context contains required fields

  • Then DCB throws a RuntimeException :

 

  • Given the SupplierAgencyService calls placeRequestAtSupplier

  • When an error is caught at the end of the return chain

  • Then DCB throws a unableToPlaceRequestAtSupplyingAgencyProblem :

 

  • Given the SupplierAgencyService calls placeHoldRequest

  • When DCB tried to getHomeIdentity

  • Then DCB throws a NoHomeIdentityException :

 

  • Given the SupplierAgencyService calls checkPatronType

  • When either the know patron or the newly mapped patron type are null

  • Then DCB throws a NullPointerException :

 

  • Given the SupplierAgencyService calls determinePatronType

  • When supplyingHostLmsCode == null || requestingIdentity == null || requestingIdentity.getHostLms() == null || requestingIdentity.getHostLms().getCode() == null

  • Then DCB throws a RuntimeException :

 

  • Given the PatronTypeService calls determinePatronType

  • When clients canonical patron type produces an empty

  • Then DCB throws a NoPatronTypeMappingFoundException :

 

  • Given the PatronTypeService calls determinePatronType

  • When no patron type can be found and a NoPatronTypeMappingFoundException isn’t thrown

  • Then DCB throws a PatronTypeMappingNotFound :

 

  • Given the PatronTypeService calls determinePatronType

  • When the return chain completes with empty

  • Then DCB throws a PatronTypeMappingNotFound :

 

Additional notes:

  • supplierPreflight exceptions are not mentioned

  • placeHoldRequestAtSupplyingAgency exceptions are not mentioned

  • findVirtualPatron exceptions are not mentioned

Operated as a Community Resource by the Open Library Foundation