1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +02:00

fix(DisplayAction): improve error handling and cache logic (#3558)

* fix(DisplayAction): improve error handling and cache logic

* restore prev timeouts

* refactor

* yup

* test: fix unit test

* leave twitter client unchanged

* leave twitter bridge unchanged
This commit is contained in:
Dag
2023-07-23 23:05:35 +02:00
committed by GitHub
parent 38ca124de0
commit 74635fd752
4 changed files with 81 additions and 58 deletions

View File

@@ -63,6 +63,11 @@ final class Response
return $this->body;
}
public function getCode()
{
return $this->code;
}
public function getHeaders()
{
return $this->headers;

View File

@@ -51,11 +51,13 @@ function get_current_url(): string
function create_sane_exception_message(\Throwable $e): string
{
$sanitizedMessage = sanitize_root($e->getMessage());
$sanitizedFilepath = sanitize_root($e->getFile());
return sprintf(
'%s: %s in %s line %s',
get_class($e),
sanitize_root($e->getMessage()),
sanitize_root($e->getFile()),
$sanitizedMessage,
$sanitizedFilepath,
$e->getLine()
);
}