Improve error handling and timestamp formatting

This commit is contained in:
netkas 2024-12-09 21:26:25 -05:00
parent 7bf5419ce3
commit 6c8cbfddec
3 changed files with 17 additions and 3 deletions

View file

@ -30,7 +30,7 @@ class CaptchaManager
}
$answer = Utilities::randomString(6, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
$current_time = (new DateTime())->setTimestamp(time());
$current_time = (new DateTime())->setTimestamp(time())->format('Y-m-d H:i:s');
if(!self::captchaExists($peer_uuid))
{

View file

@ -30,7 +30,6 @@
{
Logger::getLogger()->error('Failed to parse the client request', $e);
http_response_code($e->getCode());
print($e->getMessage());
return;
}