'DB connection failed']; if (getenv('APP_DEBUG') === '1') { $payload['detail'] = $e->getMessage(); } echo json_encode($payload, JSON_UNESCAPED_UNICODE); exit; }