summaryrefslogtreecommitdiff
path: root/client/src/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/error.ts')
-rw-r--r--client/src/error.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/error.ts b/client/src/error.ts
new file mode 100644
index 0000000..8935e23
--- /dev/null
+++ b/client/src/error.ts
@@ -0,0 +1,11 @@
+import type { FetchBaseQueryError } from '@reduxjs/toolkit/query/react';
+
+export const isFetchBaseQueryError = (
+ error: any
+): error is FetchBaseQueryError => {
+ return 'data' in error && 'message' in error.data;
+};
+
+export interface Data {
+ message: string;
+}