True when an error says the credential it was sent with is dead: HTTP 401
(rejected) or 410 (expired). Reads status, statusCode, or an
HTTP error! status: NNN message, and follows the cause chain, because a
failed recovery carries the failure that triggered it as its cause.
Use it to decide that retrying is pointless until a new token exists. A 403
(valid credential, forbidden operation) and a 5xx are NOT auth failures and
are worth retrying.
Parameters
err: unknown
Returns boolean
Example
try { awaitclient.modifyFile({ file, fileId }); } catch (err) { if (isAuthFailureError(err)) stopAutosave(); // needs a sign-in, not a timer elsescheduleRetry(); }
True when an error says the credential it was sent with is dead: HTTP 401 (rejected) or 410 (expired). Reads
status,statusCode, or anHTTP error! status: NNNmessage, and follows thecausechain, because a failed recovery carries the failure that triggered it as its cause.Use it to decide that retrying is pointless until a new token exists. A 403 (valid credential, forbidden operation) and a 5xx are NOT auth failures and are worth retrying.