Error thrown when a request fails due to a network-level issue (e.g. DNS failure, connection refused, offline).
The original error is available via the standard cause property.
cause
try { await client.todos.list();} catch (err) { if (err instanceof NetworkError) { console.log('Network issue:', err.cause); }} Copy
try { await client.todos.list();} catch (err) { if (err instanceof NetworkError) { console.log('Network issue:', err.cause); }}
Optional
Error thrown when a request fails due to a network-level issue (e.g. DNS failure, connection refused, offline).
The original error is available via the standard
causeproperty.Example