forked from KathiraveluLab/DHGWorkflow
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
The error handling in src/graph-builder/graph-core/6-server.js is pretty bare-bones right now. All the server actions (build, debug, run, clear, stop, destroy, library) just do:
.catch((err) => {
toast.error(err.message);
toast.dismiss(toastId);
});So when the backend returns something useful like "Invalid workflow file" or "Permission denied", users just see "Request failed with status code 500" or "Network Error".
Compare this to ContributeDetails.jsx which actually checks the response:
catch (error) {
if (error?.response?.status === 400) {
toast.info(error?.response?.data?.message);
} else {
toast.error(error?.response.data.message);
}
}We should update all those catch blocks to look for err.response?.data?.message first before falling back to err.message. Makes debugging way easier for userss
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels