This is a spillover (technical debt) from R1 "block override" features.
Currently, only patron block can be overridden with a regular renew-by-barcode endpoint. If there are any other blocks, they need to be overridden by a call to override-renewal-by-barcode (patron block is also overridden in this case).
All of these blocks need to become a single block that can be overridden with a call to a regular renew-by-barcode endpoint, just like patron block. Functionality of the override-renewal-by-barcode endpoint should be transferred to renew-by-barcode. After that, override-renewal-by-barcode should be removed and all of it's tests should be rewritten to use the new API.
List of errors that are overridden by override-renewal-by-barcode (taken from FE code) that should be combined to a single block:
- loan is not renewable
- item is not loanable
- item is Declared lost
- item is Aged to lost
- renewal date falls outside of date ranges in fixed loan policy
- items cannot be renewed when there is an active recall request
- loan at maximum renewal number
- renewal date falls outside of date ranges in the loan policy
- renewal would not change the due date
- profile "" in the loan policy is not recognised