Skip to content

Commit

Permalink
Close #35
Browse files Browse the repository at this point in the history
  • Loading branch information
triphora committed Dec 22, 2022
1 parent 01265b1 commit 4def590
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/com/modrinth/minotaur/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ static String resolveId(Project project, String projectId, Logger log) throws IO

int code = response.getStatusLine().getStatusCode();
if (code != 200) {
ResponseError errorInfo = createGsonInstance().fromJson(EntityUtils.toString(response.getEntity()), ResponseError.class);
if (errorInfo == null) {
errorInfo = new ResponseError();
}
String error = String.format("Project ID resolution for %s failed! Status: %s Error: %s Reason: %s", projectId, code, errorInfo.getError(), errorInfo.getDescription());
// TODO make this account for the returned error in Minotaur v3
String error = String.format("Failed to resolve project ID \"%s\"! Received status code %s", projectId, code);
log.error(error);
throw new GradleException(error);
}
Expand Down

0 comments on commit 4def590

Please sign in to comment.