Skip to content

Commit

Permalink
Fix OCM validation errors
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Feb 10, 2023
1 parent e0946a1 commit 0e62028
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/public/Federation/Exceptions/BadRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
* @since 14.0.0
*/
class BadRequestException extends HintException {
/**
* @var string[] $parameterList
*/
private $parameterList;

/**
Expand All @@ -55,7 +58,7 @@ public function __construct(array $missingParameters) {
*
* @since 14.0.0
*
* @return array
* @return array{message: string, validationErrors: array{message: string, name: string}[]}
*/
public function getReturnMessage() {
$result = [
Expand All @@ -65,7 +68,7 @@ public function getReturnMessage() {
];

foreach ($this->parameterList as $missingParameter) {
$result['validationErrors'] = [
$result['validationErrors'][] = [
'name' => $missingParameter,
'message' => 'NOT_FOUND'
];
Expand Down

0 comments on commit 0e62028

Please sign in to comment.