mail send debug
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
$config = require __DIR__ . '/config.php';
|
||||
require_once __DIR__ . '/_debug.php';
|
||||
|
||||
// Never leak PHP errors into the response; any uncaught throwable becomes a JSON 500.
|
||||
ini_set('display_errors', '0');
|
||||
set_exception_handler(function (Throwable $e): void {
|
||||
error_log('[casadoc-api] ' . $e);
|
||||
// TEMPORARY.
|
||||
debug_log('[' . ($_SERVER['REQUEST_URI'] ?? '?') . '] uncaught: ' . $e);
|
||||
if (!headers_sent()) {
|
||||
http_response_code(500);
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
Reference in New Issue
Block a user