Improve error messaging for validation exceptions

This commit is contained in:
DaneEveritt 2022-06-26 16:31:48 -04:00
parent 271197e823
commit 43156e8d53
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 31 additions and 11 deletions

View file

@ -271,7 +271,7 @@ class ServersController extends Controller
'database_limit', 'allocation_limit', 'backup_limit', 'oom_disabled',
]));
} catch (DataValidationException $exception) {
throw new ValidationException($exception->validator);
throw new ValidationException($exception->getValidator());
}
$this->alert->success(trans('admin/server.alerts.build_updated'))->flash();
@ -315,7 +315,7 @@ class ServersController extends Controller
->setUserLevel(User::USER_LEVEL_ADMIN)
->handle($server, $data);
} catch (DataValidationException $exception) {
throw new ValidationException($exception->validator);
throw new ValidationException($exception->getValidator());
}
$this->alert->success(trans('admin/server.alerts.startup_changed'))->flash();