aidbox-react 1.3.2 → 1.3.3
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/hooks/service.ts +1 -1
- package/src/services/service.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/hooks/service.ts
CHANGED
|
@@ -22,7 +22,7 @@ export function useService<S = any, F = any>(
|
|
|
22
22
|
try {
|
|
23
23
|
const response: RemoteDataResult<S, F> = await asyncFunction();
|
|
24
24
|
setRemoteData(response);
|
|
25
|
-
} catch (err) {
|
|
25
|
+
} catch (err: any) {
|
|
26
26
|
setRemoteData(failure(err.response ? err.response.data : err.message));
|
|
27
27
|
}
|
|
28
28
|
})();
|
package/src/services/service.ts
CHANGED
|
@@ -20,7 +20,7 @@ export async function service<S = any, F = any>(config: AxiosRequestConfig): Pro
|
|
|
20
20
|
const response = await axiosInstance(config);
|
|
21
21
|
|
|
22
22
|
return success(response.data);
|
|
23
|
-
} catch (err) {
|
|
23
|
+
} catch (err: any) {
|
|
24
24
|
return failure(err.response ? err.response.data : err.message);
|
|
25
25
|
}
|
|
26
26
|
}
|