fix error display for new api schema
This commit is contained in:
parent
8830fabfc7
commit
1a24fe7e99
3 changed files with 10 additions and 11 deletions
12
src/frontend/package-lock.json
generated
12
src/frontend/package-lock.json
generated
|
|
@ -5686,9 +5686,9 @@
|
|||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.742",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.742.tgz",
|
||||
"integrity": "sha512-EhE+z1d5RNytAq/qnGAxPR+ie3UzKbv7qqQc0wnEbOh+KDUplgfzkGSCy9d78B+S+nVNTS42BabHXB6Ni+Ud4w=="
|
||||
"version": "1.4.744",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.744.tgz",
|
||||
"integrity": "sha512-nAGcF0yeKKfrP13LMFr5U1eghfFSvFLg302VUFzWlcjPOnUYd52yU5x6PBYrujhNbc4jYmZFrGZFK+xasaEzVA=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "9.2.2",
|
||||
|
|
@ -13216,9 +13216,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.22.4",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",
|
||||
"integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==",
|
||||
"version": "3.22.5",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.5.tgz",
|
||||
"integrity": "sha512-HqnGsCdVZ2xc0qWPLdO25WnseXThh0kEYKIdV5F/hTHO75hNZFp8thxSeHhiPrHZKrFTo1SOgkAj9po5bexZlw==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,10 +150,8 @@ export type VertexBuildTypeAPI = {
|
|||
inactivated_vertices: Array<string> | null;
|
||||
next_vertices_ids: Array<string>;
|
||||
top_level_vertices: Array<string>;
|
||||
run_id: string;
|
||||
run_id?: string;
|
||||
valid: boolean;
|
||||
logs: Log[];
|
||||
messages: ChatOutputType[] | chatInputType[];
|
||||
data: VertexDataTypeAPI;
|
||||
timestamp: string;
|
||||
};
|
||||
|
|
@ -162,7 +160,7 @@ export type VertexBuildTypeAPI = {
|
|||
// it has results, artifacts, timedelta, duration
|
||||
export type VertexDataTypeAPI = {
|
||||
results: { [key: string]: { [key: string]: string } };
|
||||
artifacts: { [key: string]: string };
|
||||
logs:{message:string}[];
|
||||
messages: ChatOutputType[] | chatInputType[];
|
||||
timedelta?: number;
|
||||
duration?: string;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ async function buildVertex({
|
|||
if (!buildData.valid) {
|
||||
onBuildError!(
|
||||
"Error Building Component",
|
||||
[buildData.params],
|
||||
buildData.data.logs.map((log) => log.message),
|
||||
verticesIds.map((id) => ({ id }))
|
||||
);
|
||||
stopBuild();
|
||||
|
|
@ -252,6 +252,7 @@ async function buildVertex({
|
|||
}
|
||||
buildResults.push(buildData.valid);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
onBuildError!(
|
||||
"Error Building Component",
|
||||
[(error as AxiosError<any>).response?.data?.detail ?? "Unknown Error"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue