mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 18:01:39 +00:00
Migrate notebooks workspaces to generated clients (#876)
This commit is contained in:
@@ -144,13 +144,13 @@ async function getOperationStatus(operationStatusUrl: string) {
|
||||
|
||||
const body = await response.json();
|
||||
const status = body.status;
|
||||
if (!status && response.status === 200) {
|
||||
return body;
|
||||
}
|
||||
if (status === "Canceled" || status === "Failed") {
|
||||
const errorMessage = body.error ? JSON.stringify(body.error) : "Operation could not be completed";
|
||||
const error = new Error(errorMessage);
|
||||
throw new AbortError(error);
|
||||
}
|
||||
if (response.status === 200) {
|
||||
return body;
|
||||
}
|
||||
throw new Error(`Operation Response: ${JSON.stringify(body)}. Retrying.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user