From 87b023e8a24b67e1ab1e0667b0f411b961b919bd 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) (cherry picked from commit 56825b26cc590af9b0b315b878db743c654f4737) --- 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 a5cddeccea..af28acb3b1 100644 --- a/lib/NGCP/Panel/Role/API.pm +++ b/lib/NGCP/Panel/Role/API.pm @@ -1069,7 +1069,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