warnings$

View as MarkdownOpen in Claude
get warnings$(): Observable<SDKWarning>

Observable stream of non-fatal SDK warnings.

Subscribe to detect SDK behaviors that affect session liveness or developer-facing contracts but do not warrant disconnection — for example, a fallback from Client Bound SAT refresh to the developer-provided refresh() because the SAT lacks sat:refresh scope. Each warning is discriminated by its code. See SDKWarning.

Independent from errors$: existing error consumers are not notified, so reacting to a warning does not trigger error-handling code paths (disconnect cascades, user-facing toasts).

Examples

client.warnings$.subscribe((warning) => {
switch (warning.code) {
case 'credential_refresh_fallback':
console.warn('Fell back to developer refresh:', warning.reason);
break;
case 'credential_no_refresh_handler':
console.warn('Session will end at', new Date(warning.expiresAt));
break;
}
});