From f5e014c430e873bb7bd179c64a64c33c1813e366 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 12 Dec 2025 16:30:45 +0100 Subject: [PATCH] MT#64121 fix $c->error $c->error handling * errors coming from Utils::Preferences can have only 1 element in $c->error, the case is now correctly handled. Change-Id: I9f5d384da8b5cb50b78636309dbaab5efa9bdee2 (cherry picked from commit 9d70f62f70ae914b262fad31424796d5b5215154) --- lib/NGCP/Panel/Role/API.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Role/API.pm b/lib/NGCP/Panel/Role/API.pm index 9336da62e7..0503281483 100644 --- a/lib/NGCP/Panel/Role/API.pm +++ b/lib/NGCP/Panel/Role/API.pm @@ -1071,7 +1071,7 @@ sub log_response { $has_errors = 1; $errors = $c->stash->{is_api_error_response} - ? join ', ', splice @{$c->error}, 1 + ? join ', ', (splice @{$c->error}, 1) // () : join ', ', @{$c->error}; # unhandled error message, should return 500 instead of 200