selenium being fixed
This commit is contained in:
@@ -36,14 +36,17 @@ export async function forwardToSeleniumAgent(
|
||||
images,
|
||||
};
|
||||
|
||||
const response = await axios.post(
|
||||
const result = await axios.post(
|
||||
"http://localhost:5002/start-workflow",
|
||||
payload
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
if (result.data.status === "error") {
|
||||
const errorMsg =
|
||||
typeof result.data.message === "string"
|
||||
? result.data.message
|
||||
: result.data.message?.msg || "Selenium agent error";
|
||||
throw new Error(errorMsg);
|
||||
}
|
||||
|
||||
export async function forwardToSeleniumAgent2(): Promise<any> {
|
||||
const response = await axios.post("http://localhost:5002/fetch-pdf");
|
||||
return response.data;
|
||||
}
|
||||
return result.data;
|
||||
}
|
||||
Reference in New Issue
Block a user