mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 17:13:49 +00:00
Add exceptions for async file handling failures
Introduced two new exceptions, `BadCallToRemoteServer` and `TempUrlRemoteServerException`, to improve error handling in asynchronous file operations. These exceptions are thrown when there are issues with the remote server during an async file operation such as HTTP status codes >= 400 and if the server is unreachable.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\DocStoreBundle\AsyncUpload\Exception;
|
||||
|
||||
class BadCallToRemoteServer extends \LogicException
|
||||
{
|
||||
public function __construct(string $content, int $statusCode, int $code = 0, \Throwable $previous = null)
|
||||
{
|
||||
parent::__construct("Bad call to remote server: {$statusCode}, {$content}", $code, $previous);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user