Callback invoked when an automatic MAL token-refresh grant fails.
The callback fires once per failed grant. Concurrent 401s share one
in-flight grant and one failure event. It receives the sanitized
refresh error (an AniLinkError carrying the upstream status and
code), the same error the awaiting caller catches. Exceptions thrown by
the callback are reported through onHookError (falling back to a console
warning) and never replace the propagated refresh error.
Callback invoked when an automatic MAL token-refresh grant fails.
The callback fires once per failed grant. Concurrent 401s share one in-flight grant and one failure event. It receives the sanitized refresh error (an AniLinkError carrying the upstream
statusandcode), the same error the awaiting caller catches. Exceptions thrown by the callback are reported throughonHookError(falling back to a console warning) and never replace the propagated refresh error.