fix: enhance error handling in build_flow and add error handling for Flow build (#3259)

* feat: add error handling for Flow build

The code changes in `buildUtils.ts` add error handling for the Flow build process. It includes a new case for handling errors in the switch statement, which displays the error message and triggers the `onBuildError` function. This change ensures that errors during the Flow build are properly handled and the build process is stopped.

* feat: enhance error handling in build_flow to capture and report HTTP exceptions in the flow building process
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-09 11:15:35 -03:00 • committed by GitHub
commit d0484ba412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 1 deletions

View file

@ -264,6 +264,14 @@ export async function buildFlowVertices({
useFlowStore.getState().setIsBuilding(false);
return true;
}
case "error": {
const errorMessage = data.error;
console.log(data);
onBuildError!("Error Running Flow", [errorMessage], []);
buildResults.push(false);
useFlowStore.getState().setIsBuilding(false);
return true;
}
default:
return true;
}