Skip to content

Commit ab3bb3e

Browse files
committed
fix: throw error on token refresh failure instead of returning undefined
1 parent 42009c9 commit ab3bb3e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

index.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export async function CopilotAuthPlugin({ client }) {
8181
},
8282
});
8383

84-
if (!response.ok) return;
84+
if (!response.ok) {
85+
throw new Error(`Token refresh failed: ${response.status}`);
86+
}
8587

8688
const tokenData = await response.json();
8789

0 commit comments

Comments
 (0)