Skip to content

Commit

Permalink
🩹 remove mastodon connection on HTTP 401 response (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored Jun 3, 2024
1 parent dc4e04f commit 0d261c4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ private function fetchProfileInformation(): ?array {
// but has not told us yet.
Log::warning("Unable to fetch mastodon information for user#{$this->user->id} for Mastodon-Server '
. {$mastodonServer->domain}' and mastodon_id#{$this->user->socialProfile->mastodon_id}");
Log::warning($exception);
if ($exception->getCode() === 410 || $exception->getCode() === 404) {
if (in_array($exception->getCode(), [401, 404, 410])) {
$this->removeMastodonInformation();
} else {
report($exception);
}
}
}
Expand Down

0 comments on commit 0d261c4

Please sign in to comment.