mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Revert some changes to HttpFetchException
This commit is contained in:
parent
c35080d6ce
commit
97d46f43a7
@ -2,22 +2,8 @@
|
||||
|
||||
namespace BookStack\Exceptions;
|
||||
|
||||
class HttpFetchException extends PrettyException
|
||||
use Exception;
|
||||
|
||||
class HttpFetchException extends Exception
|
||||
{
|
||||
/**
|
||||
* Construct exception within BookStack\Uploads\HttpFetcher.
|
||||
*/
|
||||
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
||||
if ($previous) {
|
||||
$this->setDetails($previous->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function getStatusCode(): int
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class UserAvatars
|
||||
$avatar = $this->saveAvatarImage($user);
|
||||
$user->avatar()->associate($avatar);
|
||||
$user->save();
|
||||
} catch (HttpFetchException $e) {
|
||||
} catch (Exception $e) {
|
||||
Log::error('Failed to save user avatar image', ['exception' => $e]);
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ class UserAvatars
|
||||
$avatar = $this->createAvatarImageFromData($user, $imageData, $extension);
|
||||
$user->avatar()->associate($avatar);
|
||||
$user->save();
|
||||
} catch (HttpFetchException $e) {
|
||||
} catch (Exception $e) {
|
||||
Log::error('Failed to save user avatar image', ['exception' => $e]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user