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.
1 parent 9bcf3fa commit 002fc69Copy full SHA for 002fc69
1 file changed
Controller/Index/Html.php
@@ -231,12 +231,10 @@ private function addExceptionMessage(Exception $exception): void
231
public function createCsrfValidationException(
232
RequestInterface $request
233
): ?InvalidRequestException {
234
- $result = $this->jsonResultFactory->create();
+
235
+ $result = $this->htmlResultFactory->create();
236
$result->setHttpResponseCode(400);
- $result->setData([
237
- 'success' => false,
238
- 'message' => __('Invalid Form Key. Please refresh the page.'),
239
- ]);
+ $result->setContents('Invalid Form Key. Please refresh the page');
240
241
return new InvalidRequestException(
242
$result,
0 commit comments