Skip to content

Commit a0f9e2b

Browse files
committed
let the PostgreSQLContextFactory exception bubble up
1 parent acddd5a commit a0f9e2b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

operator/src/main/java/it/aboutbits/postgresql/core/PostgreSQLContextFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import jakarta.enterprise.context.ApplicationScoped;
66
import lombok.RequiredArgsConstructor;
77
import org.jooq.CloseableDSLContext;
8+
import org.jooq.exception.DataAccessException;
89
import org.jooq.impl.DSL;
910
import org.jspecify.annotations.NullMarked;
1011

@@ -21,7 +22,7 @@ public class PostgreSQLContextFactory {
2122
private final KubernetesClient kubernetesClient;
2223

2324
/// Create a DSLContext with a JDBC connection to the PostgreSQL maintenance database.
24-
public CloseableDSLContext getDSLContext(ClusterConnection clusterConnection) {
25+
public CloseableDSLContext getDSLContext(ClusterConnection clusterConnection) throws DataAccessException {
2526
return getDSLContext(
2627
clusterConnection,
2728
clusterConnection.getSpec().getDatabase()
@@ -32,7 +33,7 @@ public CloseableDSLContext getDSLContext(ClusterConnection clusterConnection) {
3233
public CloseableDSLContext getDSLContext(
3334
ClusterConnection clusterConnection,
3435
String database
35-
) {
36+
) throws DataAccessException {
3637
var credentials = kubernetesService.getSecretRefCredentials(
3738
kubernetesClient,
3839
clusterConnection

0 commit comments

Comments
 (0)