Improve Auth error messaging (#1358)

This commit is contained in:
Tommaso Sciortino
2025-06-23 18:37:41 -07:00
committed by GitHub
parent 104f23da90
commit 0abd2a644e
9 changed files with 57 additions and 31 deletions

View File

@@ -1,13 +0,0 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { GaxiosError } from 'gaxios';
export function isAuthError(error: unknown): boolean {
return (
error instanceof GaxiosError && error.response?.data?.error?.code === 401
);
}