in server/src/main/kotlin/com/jetbrains/teamcity/plugins/unrealengine/server/build/status/ugs/UgsCommitStatusPublisherSettings.kt [54:75]
override fun testConnection(
buildTypeOrTemplate: BuildTypeIdentity,
root: VcsRoot,
params: MutableMap<String, String>,
) = IOGuard.allowNetworkCall<Exception> {
runBlocking<Unit> {
parametersParser
.parse(params)
.map { (serverUrl, _, _) ->
either {
client.testConnection(serverUrl)
}.onLeft {
when (it) {
is GenericError -> throw PublisherException(it.message, it.exception)
else -> throw PublisherException(
"An unexpected error occurred while testing the connection to the metadata server",
)
}
}
}
}
}