NYPL / discovery-api

Discovery API: the JSON-LD API supporting NYPL Shared Collection Catalog
MIT License
6 stars 0 forks source link

Limit customer-code lookup to 5s #317

Closed nonword closed 1 year ago

nonword commented 1 year ago

Adds a quick fix to the customer code lookup that is triggered when specific items are indicated in the findById route (i.e. when retrieving item information for a hold-request). We look up an item's customer code in SCSB to be sure we have the most recent, accurate value (as it governs delivery options). If the SCSB API doesn't respond in 5s, we should assume there is a production SCSB issue and we should fall back on using whatever customer code we have indexed, which will be correct most of the time.