From b62c2d76c1a4ea2456329a77c95cb72970121ab6 Mon Sep 17 00:00:00 2001
From: Ernesto Rico Schmidt <ernesto@helsinki.at>
Date: Mon, 17 Jun 2024 17:15:36 -0400
Subject: [PATCH] fix: tweak detail and code of error message

---
 program/services.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/program/services.py b/program/services.py
index 9bd164f7..8fc245c5 100644
--- a/program/services.py
+++ b/program/services.py
@@ -825,7 +825,9 @@ def make_virtual_timeslot_entry(*, gap_start: datetime, gap_end: datetime) -> Vi
             "start": gap_start.strftime("%Y-%m-%dT%H:%M:%S%z"),
         }
     else:
-        raise NotFound("Radio settings with fallbacks not found.")
+        raise NotFound(
+            detail=_("Radio settings with fallbacks not found."), code="radio_settings-not_found"
+        )
 
 
 def get_timerange_timeslot_entries(
-- 
GitLab