Skip to content

Commit

Permalink
Merge pull request #36667 from nextcloud/fix/ocm-validation-errors
Browse files Browse the repository at this point in the history
Fix OCM validation errors
  • Loading branch information
provokateurin authored Mar 29, 2023
2 parents 31f4f41 + b271096 commit fc371fa
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 fc371fa

Please sign in to comment.