mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
test(ui): retain primary cleanup failures
This commit is contained in:
parent
99ec682a05
commit
1c08c78ad5
1 changed files with 3 additions and 1 deletions
|
|
@ -46,7 +46,9 @@ export async function runWithCleanup(
|
|||
try {
|
||||
if (outcome.status === "failure") throw outcome.error;
|
||||
} finally {
|
||||
const cleanupSucceeded = await cleanup().catch(() => false);
|
||||
const cleanupSucceeded = await Promise.resolve()
|
||||
.then(cleanup)
|
||||
.catch(() => false);
|
||||
if (outcome.status === "success" && !cleanupSucceeded) {
|
||||
throw new Error("Failed to clean up UI E2E resource");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue