File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414import type { OpenClawConfig } from "../../config/types.openclaw.js" ;
1515import { createSubsystemLogger } from "../../logging/subsystem.js" ;
1616import { resolveProviderRequestHeaders } from "../provider-request-config.js" ;
17+ import { readProviderJsonResponse } from "../provider-http-errors.js" ;
1718import { notifyAuthProfileFailureHook , setAuthProfileFailureHook } from "./failure-hook.js" ;
1819import { logAuthProfileFailureStateChange } from "./state-observation.js" ;
1920
@@ -265,7 +266,7 @@ async function probeWhamForCooldown(
265266 return { cooldownMs : WHAM_HTTP_ERROR_COOLDOWN_MS , reason : "wham_http_error" } ;
266267 }
267268
268- const data = ( await res . json ( ) ) as WhamUsageResponse ;
269+ const data = await readProviderJsonResponse < WhamUsageResponse > ( res , "WHAM usage probe" ) ;
269270 if ( ! data . rate_limit ) {
270271 return { cooldownMs : WHAM_PROBE_FAILURE_COOLDOWN_MS , reason : "wham_probe_failed" } ;
271272 }
You can’t perform that action at this time.
0 commit comments