Skip to content

Commit

Permalink
Fix Sonar finding
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhoelzl-sap committed Dec 21, 2023
1 parent 7cde84c commit 9106d32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,13 @@ public ResponseEntity<IdentityProvider> updateIdentityProvider(@PathVariable Str
final IdentityProvider updatedOriginalIdp = identityProviderProvisioning.update(body, zoneId);
return ensureConsistencyOfMirroredIdp(updatedOriginalIdp);
});

if (updatedIdp == null) {
logger.error("IdentityProvider[origin=" + body.getOriginKey() + "; zone=" + body.getIdentityZoneId() + "] - Transaction updating IdP and mirrored IdP was not successful, but no exception was thrown.");
return new ResponseEntity<>(body, UNPROCESSABLE_ENTITY);
}
updatedIdp.setSerializeConfigRaw(rawConfig);
redactSensitiveData(updatedIdp);

return new ResponseEntity<>(updatedIdp, OK);
}

Expand Down

0 comments on commit 9106d32

Please sign in to comment.