sul-dlss / folio_client

Interface for interacting with the Folio ILS API.
Other
0 stars 0 forks source link

Less confusing token refresh (maybe?) #82

Closed jmartin-sul closed 1 year ago

jmartin-sul commented 1 year ago

Why was this change made? 🤔

try to get some of the clarity benefits of #77, while also:

  1. preserving the current behavior of refreshing the token and then only retrying the one HTTP call that hit a 401 unauthorized error.
  2. introducing less copy/paste.

see commit messages for a bit more of the underlying reasoning/intuition behind these changes.

How was this change tested? 🤨

unit tests, but can also run through integration tests by e.g. pointing a branch of DSA to this branch and deploying that to stage for integration testing.

âš¡ âš  If this change has cross service impact, including data writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. âš¡

jmartin-sul commented 1 year ago

@mjgiarlo if you find this to be an improvement over the way things were before this branch, maybe i can show this PR as a quick discussion item to see if others on the team also like it compared to current main?

may also be worth looking at the commits individually, to see if the change in the second commit is actually a further improvement.

jmartin-sul commented 1 year ago

ran by folks in standup, and heard no objections, so merging...