From 39296b2dfbd2255618cb241ce215880d1c90c1a4 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Tue, 17 Dec 2024 17:38:58 +0100 Subject: [PATCH] Gracefully fail if CL_DATABASE_URL is not set. --- .changeset/beige-geckos-explode.md | 5 +++++ core/services/chainlink/config_database.go | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/beige-geckos-explode.md diff --git a/.changeset/beige-geckos-explode.md b/.changeset/beige-geckos-explode.md new file mode 100644 index 00000000000..9f06a9c989b --- /dev/null +++ b/.changeset/beige-geckos-explode.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#updated Gracefully fail if CL_DATABASE_URL is not set. diff --git a/core/services/chainlink/config_database.go b/core/services/chainlink/config_database.go index fd8aa96419d..27e61479146 100644 --- a/core/services/chainlink/config_database.go +++ b/core/services/chainlink/config_database.go @@ -107,6 +107,9 @@ func (d *databaseConfig) DefaultQueryTimeout() time.Duration { } func (d *databaseConfig) URL() url.URL { + if d.s.URL == nil { + return url.URL{} + } return *d.s.URL.URL() }