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
+{
}
$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]);
}
}
$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]);
}
}