mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #36667 from nextcloud/fix/ocm-validation-errors
Fix OCM validation errors
This commit is contained in:
commit
fc371facd2
1 changed files with 5 additions and 2 deletions
|
|
@ -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'
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue