From 46f68f307020ed6b3fae814e54ff499633b170c3 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 27 Jul 2025 10:18:32 -0500 Subject: [PATCH] Fix syntax error in runtime.exs Redis configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Wrap String.to_integer in try/rescue block properly - Fix CompileError caused by rescue clause inside case statement - Ensures runtime.exs can compile and load Redis configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- config/runtime.exs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 3f71006..29b82a3 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -135,11 +135,13 @@ if config_env() == :prod do end # Extract database from path if present - redis_database = case redis_uri.path do - nil -> 0 - "/" -> 0 - path -> - path |> String.trim_leading("/") |> String.to_integer() + redis_database = try do + case redis_uri.path do + nil -> 0 + "/" -> 0 + path -> + path |> String.trim_leading("/") |> String.to_integer() + end rescue _ -> 0 end