const state = status === "COMPLETED" ? SUCCESS : status === "FAILED" ? FAILED : PENDING;
state.progress = state.pending ? operation.progress + ((100 - operation.progress) / 2) : 100;
let newOp = Object.assign({}, operation, state);
resolve(newOp);
};
const failHandler = (response) => {
const state = status === "COMPLETED" ? SUCCESS : status === "FAILED" ? FAILED : PENDING;
state.progress = state.pending ? operation.progress + ((100 - operation.progress) / 2) : 100;
let newOp = Object.assign({}, operation, state);
resolve(newOp);
};
const failHandler = (response) => {