mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:10:11 +00:00
Use X-REQUEST-ID for Error pages
This commit is contained in:
parent
5584e7a4e5
commit
4f1bb0d274
55 changed files with 218 additions and 130 deletions
|
@ -22,13 +22,12 @@
|
|||
namespace Friendica\Module\HTTPException;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
class MethodNotAllowed extends BaseModule
|
||||
{
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
throw new HTTPException\MethodNotAllowedException(DI::l10n()->t('Method Not Allowed.'));
|
||||
throw new HTTPException\MethodNotAllowedException($this->t('Method Not Allowed.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ use Friendica\App;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Module\Special\HTTPException as ModuleHTTPException;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -46,10 +46,10 @@ class PageNotFound extends BaseModule
|
|||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Page not found.'));
|
||||
throw new HTTPException\NotFoundException($this->t('Page not found.'));
|
||||
}
|
||||
|
||||
public function run(array $request = []): ResponseInterface
|
||||
public function run(ModuleHTTPException $httpException, array $request = []): ResponseInterface
|
||||
{
|
||||
/* The URL provided does not resolve to a valid module.
|
||||
*
|
||||
|
@ -77,6 +77,6 @@ class PageNotFound extends BaseModule
|
|||
'query' => $this->server['QUERY_STRING']
|
||||
]);
|
||||
|
||||
return parent::run($request); // TODO: Change the autogenerated stub
|
||||
return parent::run($httpException, $request);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue