Class: FetchError
Defined in: src/errors.ts:48
Thrown when the network request fails.
Example
ts
import { FetchError } from 'sorbus';
try {
await api.invoices.index();
} catch (error) {
if (error instanceof FetchError) {
console.log(error.message);
}
}Extends
Error