You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(auth): redo DiskCacheError with proper context (#5558)
## Problem:
The original implementation of DiskCacheError can be simplified and
still achieve it's original purpose.
## Solution:
During token refresh we eventually write to the disk cache. Sometimes
this process fails due to filesystem errors.
We dont need to care about the actual file system error, but only that
the error came during a DiskCache operation (i.e when it attempts to
save the token to disk)
So instead, at the root of where the disk cache errors ocurr, we will
wrap caught errors in a DiskCacheError.
This adds context to the error and allows anything upstream to
specifically check for that context, instead of needing to parse the
error to see if it was filesystem related.
Additionally not all file system errors were guaranteed to come from the
disk cache, so this change allows us to target the right errors.
Signed-off-by: Nikolas Komonen <[email protected]>
---
<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->
License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
Signed-off-by: Nikolas Komonen <[email protected]>
0 commit comments