Skip to content

Commit cf04235

Browse files
committed
Revert "Improve the QueryException error response"
This reverts commit f1f9856. Fix dodgy revert
1 parent f1f9856 commit cf04235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/ImportController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function import(NovaRequest $request, $file)
7777
try {
7878
$this->importer->import($this->getFilePath($file), null, 'Csv');
7979
} catch (QueryException $e) {
80-
return response()->json(['result' => 'error', 'message' => $e->getPrevious()->errorInfo[2]], 422);
80+
throw new \Exception($e->getPrevious()->errorInfo[2]);
8181
} catch (ImportException $e) {
8282
$this->responseError($e->getMessage());
8383
} catch (NoTypeDetectedException $e) {

0 commit comments

Comments
 (0)