Skip to content

Commit

Permalink
Handling the error msg from from validation error from djnago seriali…
Browse files Browse the repository at this point in the history
…zer (#487)
  • Loading branch information
johnyrahul authored Jul 16, 2024
1 parent 8343f7a commit cf3c480
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/hooks/useExceptionHandler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit cf3c480

Please sign in to comment.