Skip to content

Commit

Permalink
fix beacon error message
Browse files Browse the repository at this point in the history
  • Loading branch information
redmitry committed Jul 24, 2024
1 parent 90c9ea6 commit 6e17a84
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-framework</artifactId>
<version>2.0.7</version>
<version>2.0.8</version>
</dependency>

<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-v2-validator-code</artifactId>
<version>0.0.7</version>
<version>0.0.8</version>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private void log(HttpResponse<AbstractBeaconResponse> response) {

String message = null;
if (response.body() instanceof BeaconErrorResponse error) {
final BeaconError err = error.getBeaconError();
final BeaconError err = error.getError();
if (err != null) {
message = err.getErrorMessage();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Response build(
} else if (beacon_response instanceof BeaconErrorResponse err) {
final BeaconResultset empty = new BeaconResultset();
empty.setExists(false);
BeaconError error = err.getBeaconError();
BeaconError error = err.getError();
if (error != null) {
JsonObjectBuilder b = Json.createObjectBuilder();
String errorMessage = error.getErrorMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public BodySubscriber<AbstractBeaconResponse> apply(ResponseInfo responseInfo) {
final BeaconError error = new BeaconError();
error.setErrorCode(responseInfo.statusCode());
error.setErrorMessage(msg);
response.setBeaconError(error);
response.setError(error);

return BodySubscribers.replacing(response);
}
Expand Down Expand Up @@ -204,7 +204,7 @@ private BeaconErrorResponse createErrorResponse(String msg) {
final BeaconError error = new BeaconError();
error.setErrorCode(0);
error.setErrorMessage(msg);
response.setBeaconError(error);
response.setError(error);
return response;
}
}

0 comments on commit 6e17a84

Please sign in to comment.