Skip to content

Commit 0866021

Browse files
committed
Fix TypeScript error in auth.ts - type assertion for error
1 parent f93ade8 commit 0866021

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sdk/src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export class DemiurgeAuth {
345345
clearTimeout(timeoutId);
346346

347347
if (!response.ok) {
348-
const error = await response.json().catch(() => ({ message: 'Unknown error' }));
348+
const error = await response.json().catch(() => ({ message: 'Unknown error' })) as { message?: string };
349349
throw new Error(error.message || `HTTP ${response.status}`);
350350
}
351351

0 commit comments

Comments
 (0)