[K/N][perf] Add try-clause for sending request

This commit is contained in:
Pavel Punegov
2022-07-26 13:44:18 +03:00
committed by Space
parent 1addc23b23
commit 911512ba96
@@ -102,7 +102,12 @@ open class BuildRegister : DefaultTask() {
append("\"buildNumberSuffix\": ${buildNumberSuffix?.let { "\"$buildNumberSuffix\"" } ?: buildNumberSuffix}}") append("\"buildNumberSuffix\": ${buildNumberSuffix?.let { "\"$buildNumberSuffix\"" } ?: buildNumberSuffix}}")
} }
if (onlyBranch == null || onlyBranch == branch) { if (onlyBranch == null || onlyBranch == branch) {
println(sendPostRequest("$performanceServer/register", requestBody)) try {
println(sendPostRequest("$performanceServer/register", requestBody))
} catch (t: Throwable) {
println("Failed to send POST to '$performanceServer/register'")
throw t
}
} else { } else {
println("Skipping registration. Current branch $branch, need registration for $onlyBranch!") println("Skipping registration. Current branch $branch, need registration for $onlyBranch!")
} }