@ventlio/tanstack-query 0.2.39 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -193,7 +193,7 @@ async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, he
193
193
  });
194
194
  }
195
195
  catch (error) {
196
- const errorData = error.response.data;
196
+ const errorData = error?.response?.data;
197
197
  return errorTransformer({
198
198
  statusCode: error.status,
199
199
  message: error.message,
@@ -226,7 +226,7 @@ const useDeleteRequest = () => {
226
226
  rej(postResponse);
227
227
  }
228
228
  }, 200);
229
- }), { ...options });
229
+ }), { enabled: false, ...options });
230
230
  const updatedPathAsync = async (link) => {
231
231
  return updateDeletePath(link);
232
232
  };
@@ -31,7 +31,7 @@ const useDeleteRequest = () => {
31
31
  rej(postResponse);
32
32
  }
33
33
  }, 200);
34
- }), { ...options });
34
+ }), { enabled: false, ...options });
35
35
  const updatedPathAsync = async (link) => {
36
36
  return updateDeletePath(link);
37
37
  };
@@ -38,7 +38,7 @@ async function makeRequest({ body, method = request_enum.HttpMethod.GET, path, i
38
38
  });
39
39
  }
40
40
  catch (error) {
41
- const errorData = error.response.data;
41
+ const errorData = error?.response?.data;
42
42
  return transformer.errorTransformer({
43
43
  statusCode: error.status,
44
44
  message: error.message,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [
@@ -36,7 +36,7 @@ export const useDeleteRequest = <TResponse>() => {
36
36
  }
37
37
  }, 200);
38
38
  }),
39
- { ...options }
39
+ { enabled: false, ...options }
40
40
  );
41
41
 
42
42
  const updatedPathAsync = async (link: string) => {
@@ -51,7 +51,7 @@ export async function makeRequest<TResponse>({
51
51
  status: resp.status,
52
52
  });
53
53
  } catch (error: any) {
54
- const errorData = error.response.data;
54
+ const errorData = error?.response?.data;
55
55
  return errorTransformer({
56
56
  statusCode: error.status,
57
57
  message: error.message,