From 37d30814fda19dfc61f7952a691b96036df2ed36 Mon Sep 17 00:00:00 2001 From: pavel-raykov <165708424+pavel-raykov@users.noreply.github.com> Date: Thu, 19 Dec 2024 07:54:08 +0100 Subject: [PATCH] Gracefully fail if CL_DATABASE_URL is not set. (#15741) --- .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() }