Skip to content

Commit

Permalink
fix: update method wrt previous changes in getDeployment #4563 (#4566)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomer2001 authored Apr 12, 2023
1 parent 358c494 commit 53adff1
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,14 @@ private Pair<Response, Set<String>> projectFlows(String projectName) {
Response res = getDeployment(projectName);
if (res.getStatus() != Response.Status.OK.getStatusCode()) return new Pair<>(res, null);

Deployment d = (Deployment) res.getEntity();
//Retrieve the flows this project contains
return new Pair<>(null, d.getDetails().getFlowsError().keySet());
try {
Deployment d = mapper.readValue(res.getEntity().toString(), Deployment.class);
//Retrieve the flows this project contains
return new Pair<>(null, d.getDetails().getFlowsError().keySet());
} catch (JsonProcessingException e) {
logger.error(e.getMessage(), e);
return new Pair<>(Response.serverError().build(), null);
}

}

Expand All @@ -274,4 +279,4 @@ private void init() {
mapper = new ObjectMapper();
}

}
}

0 comments on commit 53adff1

Please sign in to comment.