This commit is contained in:
paoloar77
2024-11-27 15:38:18 +01:00
parent 8c8f4fe8cc
commit 201c70ca15

View File

@@ -45,8 +45,7 @@ class ArticleController extends Controller
} catch (\Exception $e) {
// Registrazione dell'errore
\Log::error('Error querying articles sales: ' . $e->getMessage());
return collect(); // Ritorna una collection vuota in caso di errore
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
}
return $articoliVenduti;