Skip to content

Commit 7bb7a74

Browse files
author
Marius Posta
authored
extract-jdbc: throw ConfigErrorException on cursor NULL value (#44009)
1 parent c9b3490 commit 7bb7a74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

airbyte-cdk/bulk/toolkits/extract-jdbc/src/main/kotlin/io/airbyte/cdk/read/StreamPartitionsCreatorUtils.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package io.airbyte.cdk.read
44
import com.fasterxml.jackson.core.JsonGenerator
55
import com.fasterxml.jackson.databind.JsonNode
66
import com.fasterxml.jackson.databind.node.ObjectNode
7+
import io.airbyte.cdk.ConfigErrorException
78
import io.airbyte.cdk.discover.Field
89
import io.airbyte.cdk.util.Jsons
910
import io.github.oshai.kotlinlogging.KotlinLogging
@@ -104,7 +105,7 @@ class StreamPartitionsCreatorUtils(
104105
ctx.selectQuerier.executeQuery(q).use { if (it.hasNext()) it.next() else return null }
105106
val value: JsonNode = record[cursor.id] ?: Jsons.nullNode()
106107
if (value.isNull) {
107-
throw IllegalStateException("NULL value found for cursor ${cursor.id}")
108+
throw ConfigErrorException("NULL value found for cursor ${cursor.id}")
108109
}
109110
return ctx.transientCursorUpperBoundState.update { value }
110111
}

0 commit comments

Comments
 (0)