Skip to content

Commit

Permalink
Remove redundant method.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeethJJ committed Dec 13, 2023
1 parent b77af72 commit e9605ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.wso2.carbon.identity.api.user.onboard.common.util;

import org.apache.logging.log4j.ThreadContext;
import org.slf4j.MDC;

import java.util.UUID;
Expand All @@ -35,7 +36,7 @@ public class Utils {
public static String getCorrelation() {

if (isCorrelationIDPresent()) {
return MDC.get("Correlation-ID").toString();
return ThreadContext.get("Correlation-ID");
}
return UUID.randomUUID().toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ private Configuration prepareConfigObject(InvitationRequest invitationRequest, S
return new Configuration(invitationRequest.getUsername(), invitationRequest.getUserstore(), tenantDomain);
}

private APIError handleException(Constants.ErrorMessages errorEnum, String... data) {

Response.Status status;
ErrorResponse errorResponse;
if (isNotFoundScenario(errorEnum.getCode())) {
status = Response.Status.NOT_FOUND;
} else {
status = Response.Status.INTERNAL_SERVER_ERROR;
}
errorResponse = getErrorBuilder(errorEnum)
.build(LOG, buildErrorDescription(errorEnum.getDescription(), data), true);
return new APIError(status, errorResponse);
}

private APIError handleException(IdentityRecoveryException exception, Constants.ErrorMessages errorEnum,
String... data) {

Expand Down

0 comments on commit e9605ff

Please sign in to comment.