We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BadRequestHttpException
extra_options
1 parent 32224c4 commit e59554aCopy full SHA for e59554a
src/Autocomplete/src/Controller/EntityAutocompleteController.php
@@ -76,7 +76,11 @@ private function getExtraOptions(Request $request): array
76
return [];
77
}
78
79
- $extraOptions = $this->getDecodedExtraOptions($request->query->getString(self::EXTRA_OPTIONS));
+ try {
80
+ $extraOptions = $this->getDecodedExtraOptions($request->query->getString(self::EXTRA_OPTIONS));
81
+ } catch (\JsonException $e) {
82
+ throw new BadRequestHttpException('The extra options cannot be parsed.', $e);
83
+ }
84
85
if (!\array_key_exists(AutocompleteChoiceTypeExtension::CHECKSUM_KEY, $extraOptions)) {
86
throw new BadRequestHttpException('The extra options are missing the checksum.');
0 commit comments