1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-10-16 00:56:08 +02:00

fix: dont log user errors (#4660)

This commit is contained in:
Dag
2025-08-08 02:16:43 +02:00
committed by GitHub
parent 81ce9c9483
commit a599f4ba83
2 changed files with 13 additions and 7 deletions

View File

@@ -242,9 +242,16 @@ function create_random_string(int $bytes = 16): string
return bin2hex(openssl_random_pseudo_bytes($bytes));
}
/**
* Thrown by bridges to indicate user failure. Will not be logged.
*/
final class ClientException extends \Exception
{
}
function throwClientException(string $message = '')
{
throw new \Exception($message, 400);
throw new ClientException($message, 400);
}
function throwServerException(string $message = '')