Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
  • Loading branch information
myskov and adoroszlai authored Jan 2, 2024
1 parent 3e4dfa9 commit 0086789
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ private Response generateInternal(@Nullable String username) throws IOException
S3SecretResponse s3SecretResponse = new S3SecretResponse();
s3SecretResponse.setAwsSecret(s3SecretValue.getAwsSecret());
s3SecretResponse.setAwsAccessKey(s3SecretValue.getAwsAccessKey());
AUDIT.logReadSuccess(buildAuditMessageForSuccess(
AUDIT.logWriteSuccess(buildAuditMessageForSuccess(
S3GAction.GENERATE_SECRET, getAuditParameters()));
return Response.ok(s3SecretResponse).build();
} catch (OMException e) {
AUDIT.logWriteFailure(buildAuditMessageForFailure(
S3GAction.REVOKE_SECRET, getAuditParameters(), e));
S3GAction.GENERATE_SECRET, getAuditParameters(), e));
if (e.getResult() == OMException.ResultCodes.S3_SECRET_ALREADY_EXISTS) {
return Response.status(BAD_REQUEST.getStatusCode(), e.getResult().toString()).build();
} else {
LOG.error("Can't execute revoke secret request: ", e);
LOG.error("Can't execute get secret request: ", e);
return Response.serverError().build();
}
}
Expand Down

0 comments on commit 0086789

Please sign in to comment.