diff --git a/lib/Controller/DocumentAPIController.php b/lib/Controller/DocumentAPIController.php index fcbd3399c0..4b73c319e8 100644 --- a/lib/Controller/DocumentAPIController.php +++ b/lib/Controller/DocumentAPIController.php @@ -105,10 +105,12 @@ public function create(string $mimeType, string $fileName, string $directoryPath } } catch (Throwable $e) { $this->logger->error('Failed to create document', ['exception' => $e]); - return new JSONResponse([ + $response = new JSONResponse([ 'status' => 'error', 'message' => $this->l10n->t('Cannot create document') ], Http::STATUS_BAD_REQUEST); + $response->throttle(); + return $response; } $basename = $this->l10n->t('New Document.odt');