Skip to content

Commit

Permalink
EPMRPP-90612 || Error in UAT logs when there is no GitHub integration
Browse files Browse the repository at this point in the history
  • Loading branch information
APiankouski committed Jul 12, 2024
1 parent 3da194b commit 2f744f8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ public ResponseEntity<?> getOauthIntegrationById(String oauthProviderId) {
return oAuthRegistrationById.map(OAuthRegistrationConverters.TO_RESOURCE)
.map(ResponseEntity::ok).get();
} else {
Map<String, String> body = new HashMap<>();
body.put("errorCode", String.valueOf(ErrorType.AUTH_INTEGRATION_NOT_FOUND.getCode()));
body.put("message", Suppliers.formattedSupplier("Oauth settings with id = {} have not been found.",
oauthProviderId).get());
return new ResponseEntity<>(body, HttpStatus.NOT_FOUND);
return new ResponseEntity<>(new ReportPortalException(ErrorType.AUTH_INTEGRATION_NOT_FOUND,
Suppliers.formattedSupplier("Oauth settings with id = {} have not been found.",
oauthProviderId).get()), HttpStatus.NOT_FOUND);
}
}
}

0 comments on commit 2f744f8

Please sign in to comment.