mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:50:12 +00:00
Improved http error handling
This commit is contained in:
parent
b2165cdf22
commit
4236a9a105
55 changed files with 282 additions and 135 deletions
|
@ -32,8 +32,7 @@ use Friendica\DI;
|
|||
use Friendica\Factory\ConfigFactory;
|
||||
use Friendica\Model\Register;
|
||||
use Friendica\Module\BaseAdmin;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Util\ConfigFileLoader;
|
||||
use Friendica\Network\HTTPException\ServiceUnavailableException;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
class Summary extends BaseAdmin
|
||||
|
@ -129,7 +128,7 @@ class Summary extends BaseAdmin
|
|||
$stream = $fileSystem->createStream($file);
|
||||
|
||||
if (!isset($stream)) {
|
||||
throw new InternalServerErrorException('Stream is null.');
|
||||
throw new ServiceUnavailableException('Stream is null.');
|
||||
}
|
||||
|
||||
} catch (\Throwable $exception) {
|
||||
|
@ -143,7 +142,7 @@ class Summary extends BaseAdmin
|
|||
$stream = $fileSystem->createStream($file);
|
||||
|
||||
if (!isset($stream)) {
|
||||
throw new InternalServerErrorException('Stream is null.');
|
||||
throw new ServiceUnavailableException('Stream is null.');
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue