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

fix: introduce system env var, remove debug mode (#4658)

* fix: introduce system env var

* docs

* docs
This commit is contained in:
Dag
2025-08-08 01:38:12 +02:00
committed by GitHub
parent a128c05a97
commit 81ce9c9483
12 changed files with 55 additions and 95 deletions

View File

@@ -23,12 +23,10 @@ class HttpException extends \Exception
public static function fromResponse(Response $response, string $url): HttpException
{
$message = sprintf(
'%s resulted in %s %s %s',
'%s resulted in %s %s',
$url,
$response->getCode(),
$response->getStatusLine(),
// If debug, include a part of the response body in the exception message
Debug::isEnabled() ? mb_substr($response->getBody(), 0, 500) : '',
$response->getStatusLine()
);
if (CloudFlareException::isCloudFlareResponse($response)) {
return new CloudFlareException($message, $response->getCode(), $response);