Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[Fix] Handled client side network issues (#833)

jagadeeswaran-zipstack8da57d3ec77d
diff --git a/frontend/src/hooks/useExceptionHandler.jsx b/frontend/src/hooks/useExceptionHandler.jsx
index e11f8f5e8..c9472015c 100644
--- a/frontend/src/hooks/useExceptionHandler.jsx
+++ b/frontend/src/hooks/useExceptionHandler.jsx
@@ -18,6 +18,21 @@ const useExceptionHandler = () => {
duration: duration,
};
}
+ if (err.code === "ERR_NETWORK" && !navigator.onLine) {
+ return {
+ type: "error",
+ content: "Please check your internet connection.",
+ title: title,
+ duration: duration,
+ };
+ } else if (err.code === "ERR_CANCELED") {
+ return {
+ type: "error",
+ content: "Request has been canceled.",
+ title: title,
+ duration: duration,
+ };
+ }
if (err?.response?.data) {
const { type, errors } = err.response.data;