NOW MANAGED ON CODEBERG
Revert some changes to HttpFetchException
Thomas Kuschan97d46f43a76d
diff --git a/app/Exceptions/HttpFetchException.php b/app/Exceptions/HttpFetchException.phpindex c445896c0..4ad45d92a 100644--- a/app/Exceptions/HttpFetchException.php+++ b/app/Exceptions/HttpFetchException.php@@ -2,22 +2,8 @@namespace BookStack\Exceptions;-class HttpFetchException extends PrettyException-{- /**- * 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());- }- }+use Exception;- public function getStatusCode(): int- {- return 500;- }+class HttpFetchException extends Exception+{}diff --git a/app/Uploads/UserAvatars.php b/app/Uploads/UserAvatars.phpindex 1cad3465c..3cd37812a 100644--- a/app/Uploads/UserAvatars.php+++ b/app/Uploads/UserAvatars.php@@ -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]);}}