aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2023-03-29 20:47:49 +0200
committerGitHub <noreply@github.com>2023-03-29 20:47:49 +0200
commitfc371facd202d7ede86f1adb37fc78a8c478deff (patch)
tree467bcebf92ef9668c9eb0950d42d6c920822e6f8
parent31f4f4117e37849dabbf6b3c83790af878c01119 (diff)
parentb271096495cdcea1b743a572fc73cdb830fbfd25 (diff)
downloadnextcloud-server-fc371facd202d7ede86f1adb37fc78a8c478deff.tar.gz
nextcloud-server-fc371facd202d7ede86f1adb37fc78a8c478deff.zip
Merge pull request #36667 from nextcloud/fix/ocm-validation-errors
Fix OCM validation errors
-rw-r--r--lib/public/Federation/Exceptions/BadRequestException.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/public/Federation/Exceptions/BadRequestException.php b/lib/public/Federation/Exceptions/BadRequestException.php
index 8054c0e89f0..bc8b5c7b724 100644
--- a/lib/public/Federation/Exceptions/BadRequestException.php
+++ b/lib/public/Federation/Exceptions/BadRequestException.php
@@ -32,6 +32,9 @@ use OCP\HintException;
* @since 14.0.0
*/
class BadRequestException extends HintException {
+ /**
+ * @var string[] $parameterList
+ */
private $parameterList;
/**
@@ -55,7 +58,7 @@ class BadRequestException extends HintException {
*
* @since 14.0.0
*
- * @return array
+ * @return array{message: string, validationErrors: array{message: string, name: string}[]}
*/
public function getReturnMessage() {
$result = [
@@ -65,7 +68,7 @@ class BadRequestException extends HintException {
];
foreach ($this->parameterList as $missingParameter) {
- $result['validationErrors'] = [
+ $result['validationErrors'][] = [
'name' => $missingParameter,
'message' => 'NOT_FOUND'
];