Fix extractHeaderStatus to handle undefined and non-string messages (#2393)

* Fix extractHeaderStatus to handle undefined and non-string messages

* Fix unsafe casts

---------

Co-authored-by: Laurent Nguyen <languye@microsoft.com>
This commit is contained in:
Laurent Nguyen
2026-02-20 16:42:17 +01:00
committed by GitHub
parent cc26e2800e
commit 5832170b2b
3 changed files with 6 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ const requestFabricToken = async (): Promise<void> => {
scheduleRefreshFabricToken();
} catch (error) {
logConsoleError(error as string);
logConsoleError(error instanceof Error ? error.message : String(error));
throw error;
} finally {
lastRequestTimestamp = undefined;