Error thrown when a request is attempted while the client is offline.
Extends NetworkError so offline errors are caught by isNetworkError() checks.
isNetworkError()
try { await client.todos.list();} catch (err) { if (isOfflineError(err)) { console.log('Cannot make requests while offline'); }} Copy
try { await client.todos.list();} catch (err) { if (isOfflineError(err)) { console.log('Cannot make requests while offline'); }}
Optional
Error thrown when a request is attempted while the client is offline.
Extends NetworkError so offline errors are caught by
isNetworkError()checks.Example