Use X-REQUEST-ID for Error pages

This commit is contained in:
Philipp 2022-12-26 21:17:32 +01:00
parent 5584e7a4e5
commit 4f1bb0d274
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
55 changed files with 218 additions and 130 deletions

View file

@ -181,7 +181,7 @@ abstract class BaseModule implements ICanHandleRequests
/**
* {@inheritDoc}
*/
public function run(array $request = []): ResponseInterface
public function run(ModuleHTTPException $httpException, array $request = []): ResponseInterface
{
// @see https://github.com/tootsuite/mastodon/blob/c3aef491d66aec743a3a53e934a494f653745b61/config/initializers/cors.rb
if (substr($this->args->getQueryString(), 0, 12) == '.well-known/') {
@ -243,7 +243,7 @@ abstract class BaseModule implements ICanHandleRequests
$this->response->addContent($arr['content']);
$this->response->addContent($this->content($request));
} catch (HTTPException $e) {
$this->response->addContent((new ModuleHTTPException())->content($e));
$this->response->addContent($httpException->content($e));
} finally {
$this->profiler->set(microtime(true) - $timestamp, 'content');
}