From 6ce43f4608bfcaa5e5c9651dd6b1492348838203 Mon Sep 17 00:00:00 2001 From: Kharec Date: Sun, 28 Dec 2025 17:32:25 +0100 Subject: [PATCH] feat: use HTML templates for public errors --- lib/Urupam/App.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Urupam/App.pm b/lib/Urupam/App.pm index 664f484..a36b9b3 100644 --- a/lib/Urupam/App.pm +++ b/lib/Urupam/App.pm @@ -94,8 +94,8 @@ sub startup { && $validator->validate_short_code($short_code) ) { $c->render( - json => { error => 'Invalid short code format' }, - status => 400 + template => '404', + status => 404 ); return; } @@ -109,8 +109,8 @@ sub startup { } else { $c->render( - json => { error => 'Short code not found' }, - status => 404 + template => '404', + status => 404 ); } } @@ -120,8 +120,8 @@ sub startup { return if $c->stash->{rendered}; $c->app->log->error("Redirect lookup error: $err"); $c->render( - json => { error => 'Internal server error' }, - status => 500 + template => '500', + status => 500 ); } );