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 9d70f62f70)
(cherry picked from commit 56825b26cc)
mr12.5.1
Kirill Solomko 4 weeks ago
parent eb40f344aa
commit 87b023e8a2

@ -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

Loading…
Cancel
Save