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)
mr13.5
Kirill Solomko 4 months ago
parent a2b54623ce
commit f5e014c430

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

Loading…
Cancel
Save