mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix: make TelemetryClient throw errors on auth failures to enable proper queue retry
- TelemetryClient now throws errors when authentication fails or session token is missing - This allows the queue processor to properly identify failed sends and retry them later - Fixes issue where telemetry events were being discarded when in inactive-session state - Events will now be queued and retried when authentication is restored
This commit is contained in:
parent
951feff080
commit
b1806e2d37
1 changed files with 2 additions and 2 deletions
|
|
@ -27,14 +27,14 @@ export class TelemetryClient extends BaseTelemetryClient {
|
|||
|
||||
private async fetch(path: string, options: RequestInit) {
|
||||
if (!this.authService.isAuthenticated()) {
|
||||
return
|
||||
throw new Error("Not authenticated")
|
||||
}
|
||||
|
||||
const token = this.authService.getSessionToken()
|
||||
|
||||
if (!token) {
|
||||
console.error(`[TelemetryClient#fetch] Unauthorized: No session token available.`)
|
||||
return
|
||||
throw new Error("No session token available")
|
||||
}
|
||||
|
||||
const response = await fetch(`${getRooCodeApiUrl()}/api/${path}`, {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue