diff --git a/backend/core/bootstrap.php b/backend/core/bootstrap.php index fe995b6..a85cb58 100644 --- a/backend/core/bootstrap.php +++ b/backend/core/bootstrap.php @@ -127,7 +127,7 @@ try { $redisLocation = null; } } -} catch (Exception $e) { +} catch (Throwable $e) { error_log("[REDIS] Connection failed: " . $e->getMessage()); $redis = null; $redisLocation = null; diff --git a/backend/loginFirstTime.php b/backend/loginFirstTime.php index 972a051..06d8fe4 100644 --- a/backend/loginFirstTime.php +++ b/backend/loginFirstTime.php @@ -85,7 +85,7 @@ try { 'expires_in' => 150, ]); -} catch (Exception $e) { +} catch (Throwable $e) { securityLog("LoginFirstTime Error", ['msg' => $e->getMessage()]); - jsonError('Server error', 500); + jsonError('Server error: ' . $e->getMessage(), 500); } \ No newline at end of file diff --git a/backend/test_api.php b/backend/test_api.php new file mode 100644 index 0000000..b4d3025 --- /dev/null +++ b/backend/test_api.php @@ -0,0 +1,14 @@ +flushAll(); + +$ch = curl_init('https://jordan-siro.intaleqapp.com/backend/loginFirstTime.php'); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_HEADER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, 'id=new&password=unknown&aud=passenger-app:ios'); +$response = curl_exec($ch); +curl_close($ch); + +echo "RAW RESPONSE:\n"; +echo $response;