Skip to content

Commit ca7ff83

Browse files
committed
chore(ai-assist): log assist service response codes (#13995)
1 parent 4e6b440 commit ca7ff83

File tree

1 file changed

+5
-0
lines changed
  • airbyte-connector-builder-server/src/main/kotlin/io/airbyte/connector_builder/requester/assist

1 file changed

+5
-0
lines changed

airbyte-connector-builder-server/src/main/kotlin/io/airbyte/connector_builder/requester/assist/AssistProxy.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ import com.fasterxml.jackson.databind.JsonNode
99
import com.fasterxml.jackson.databind.ObjectMapper
1010
import io.airbyte.connector_builder.exceptions.AssistProxyException
1111
import io.airbyte.connector_builder.exceptions.ConnectorBuilderException
12+
import io.github.oshai.kotlinlogging.KotlinLogging
1213
import java.io.IOException
1314
import java.io.InputStreamReader
1415

16+
private val logger = KotlinLogging.logger {}
17+
1518
class AssistProxy(private val proxyConfig: AssistConfiguration) {
1619
fun post(
1720
path: String,
1821
jsonBody: JsonNode?,
1922
): JsonNode {
23+
logger.info { "Calling Assist API with path: $path" }
2024
val connection = proxyConfig.getConnection(path)
2125
connection.apply {
2226
requestMethod = "POST"
@@ -34,6 +38,7 @@ class AssistProxy(private val proxyConfig: AssistConfiguration) {
3438

3539
try {
3640
responseCode = connection.responseCode
41+
logger.info { "Assist API response code: $responseCode" }
3742
val inputStream =
3843
if (responseCode in 200..299) {
3944
connection.inputStream

0 commit comments

Comments
 (0)