refactor: updates based on the provider methods signature changes

This commit is contained in:
jamesgeorge007
2024-02-09 22:49:38 +05:30
parent c1a8a871d2
commit 392b2fc48d
8 changed files with 476 additions and 432 deletions

View File

@@ -292,20 +292,19 @@ const saveRequestAs = async () => {
return
}
const resultHandle = await workspaceService.updateRESTRequest(
const updateRequestResult = await workspaceService.updateRESTRequest(
requestHandle,
updatedRequest
)
if (E.isLeft(resultHandle)) {
if (E.isLeft(updateRequestResult)) {
// WORKSPACE_INVALIDATED | INVALID_REQUEST_HANDLE
return
}
const result = resultHandle.right
if (updateRequestResult.right.type === "invalid") {
// REQUEST_INVALIDATED | REQUEST_PATH_NOT_FOUND
if (result.value.type === "invalid") {
// WORKSPACE_INVALIDATED | INVALID_REQUEST_HANDLE
return
}