Skip to content

Commit

Permalink
do not try to delete credentials if they have not yet been submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Jun 20, 2023
1 parent a62466a commit aae853e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/cryostat/agent/CryostatClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ private CompletableFuture<Integer> submitCredentials(Credentials credentials, UR
}

public CompletableFuture<Void> deleteCredentials(int id) {
if (id < 0) {
return CompletableFuture.completedFuture(null);
}
HttpDelete req = new HttpDelete(baseUri.resolve(CREDENTIALS_API_PATH + "/" + id));
log.info("{}", req);
return supply(req, (res) -> logResponse(req, res))
Expand Down

0 comments on commit aae853e

Please sign in to comment.