Add error handling for missing vendor to prevent 500 Empty Body errors
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
$autoload = __DIR__ . '/../vendor/autoload.php';
|
||||
if (file_exists($autoload)) {
|
||||
require_once $autoload;
|
||||
} else {
|
||||
http_response_code(500);
|
||||
echo json_encode(['status' => 'failure', 'message' => 'Vendor autoload missing. Please run composer install.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 2. لا حاجة لتحميل .env يدوياً: Docker يحقن المتغيّرات عبر env_file
|
||||
|
||||
Reference in New Issue
Block a user