mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-22 10:18:38 +02:00
fix: introduce system env var, remove debug mode (#4658)
* fix: introduce system env var * docs * docs
This commit is contained in:
parent
a128c05a97
commit
81ce9c9483
12 changed files with 55 additions and 95 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue