This commit is contained in:
Lain Iwakura 2025-06-16 01:40:29 +03:00
parent ea69fc799a
commit 0845621f0e
No known key found for this signature in database
GPG Key ID: C7C18257F2ADC6F8

View File

@ -23,8 +23,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode(['messages' => $messages]);
} catch (Exception $e) {
error_log("API Error: " . $e->getMessage());
http_response_code(500);
echo json_encode(['error' => 'Server error']);
echo json_encode(['error' => 'Server error', 'details' => $e->getMessage()]);
}
exit;
}