We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdfb507 commit 5c87de5Copy full SHA for 5c87de5
src/error.ts
@@ -18,6 +18,10 @@ export class FetchError<T = any> extends Error implements IFetchError<T> {
18
// Augment `FetchError` type to include `IFetchError` properties
19
export interface FetchError<T = any> extends IFetchError<T> {}
20
21
+export function isFetchError() {
22
+ return (e: unknown): e is FetchError => e instanceof FetchError;
23
+}
24
+
25
export function createFetchError<T = any>(
26
ctx: FetchContext<T>
27
): IFetchError<T> {
0 commit comments