Skip to content

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

Handling the error msg from from validation error from djnago serializer (#487)

Rahul Johnycf3c480ad911
diff --git a/frontend/src/hooks/useExceptionHandler.jsx b/frontend/src/hooks/useExceptionHandler.jsx
index d1268823d..4f7835e54 100644
--- a/frontend/src/hooks/useExceptionHandler.jsx
+++ b/frontend/src/hooks/useExceptionHandler.jsx
@@ -26,6 +26,13 @@ const useExceptionHandler = () => {
// Handle validation errors
if (setBackendErrors) {
setBackendErrors(err?.response?.data);
+ } else {
+ return {
+ title: title,
+ type: "error",
+ content: errors?.[0]?.detail ? errors[0].detail : errMessage,
+ duration: duration,
+ };
}
break;
case "subscription_error":