summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-10-19 09:29:28 +0200
committerHarald Musum <musum@yahooinc.com>2023-10-19 09:29:28 +0200
commit0fc02594233f37e093c9b6358b42b22f276723f1 (patch)
tree6c21faaa20b71720a1194a1f3dda72017a41caf2 /configserver
parent58106d4418286685787c66603358e6e9fa34263a (diff)
Log without stack trace and explain common cause when multipart parsing fails
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
index ade63e8c90c..29f2125ac3c 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
@@ -93,12 +93,13 @@ public class ApplicationApiHandler extends SessionHandler {
PartItem appPackagePart = parts.get(MULTIPART_APPLICATION_PACKAGE);
compressedStream = createFromCompressedStream(appPackagePart.data(), appPackagePart.contentType(), maxApplicationPackageSize);
} catch (IOException e) {
- // Multipart exception happens when controller abandons the request due to other exceptions while deploying.
- log.log(e instanceof MultiPartFormParser.MultiPartException ? FINE : WARNING,
- "Unable to parse multipart in deploy from tenant '" + tenantName.value() + "': " + Exceptions.toMessageString(e));
-
var message = "Deploy request from '" + tenantName.value() + "' contains invalid data: " + e.getMessage();
- log.log(INFO, message + ", parts: " + parts, e);
+ if (e instanceof MultiPartFormParser.MultiPartException)
+ log.log(INFO, "Unable to parse multipart in deploy from tenant '" + tenantName.value() + "': " +
+ Exceptions.toMessageString(e) + ". This is usually caused by controller abandoning request " +
+ "while streaming data to config server");
+ else
+ log.log(INFO, message + ", parts: " + parts, e);
throw new BadRequestException(message);
}
} else {