Skip to content

Commit 33de170

Browse files
larsbeckclaude
authored andcommitted
fix: do not log successful model deploy response as error
DeployModelMojo called printErrorInfo() on the success branches of deploy and update, logging the platform's success response body at ERROR level even though deployment succeeded. Limit printErrorInfo() to the genuine failure branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2e9d73a commit 33de170

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

service/tools/maven-plugin/src/main/java/ai/timefold/solver/tools/maven/DeployModelMojo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ public void execute() throws MojoExecutionException {
132132
"Model %s (%s) has been successfully deployed into platform %s with registration key %s",
133133
modelDescriptor.get("name").asText(), modelDescriptor.get("id").asText(), platformUrl,
134134
key));
135-
printErrorInfo(response);
136135
} else if (response.statusCode() >= 409) {
137136
if (getPropertyOrParameter(PROP_MODEL_OVERWRITE, overwrite)) {
138137

@@ -147,7 +146,6 @@ public void execute() throws MojoExecutionException {
147146
"Model %s (%s) has been successfully updated on platform %s with registration key %s",
148147
modelDescriptor.get("name").asText(), modelDescriptor.get("id").asText(), platformUrl,
149148
key));
150-
printErrorInfo(response);
151149
} else {
152150
throw new IllegalStateException(
153151
"Model deployment (override) failed with " + response.statusCode() + " status code");

0 commit comments

Comments
 (0)