Skip to content

Commit

Permalink
fix: remove error notification if caused by AbortError
Browse files Browse the repository at this point in the history
  • Loading branch information
kfastov committed Nov 5, 2024
1 parent 14db789 commit ac38311
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/[addressOrDomain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,14 @@ export default function Page({ params }: AddressOrDomainProps) {
fetchPortfolioAssets(data),
]);
} catch (error) {
showNotification("Error while fetching address portfolio", "error");
console.log("Error while fetching address portfolio", error);
if (error instanceof Error && error.name === 'AbortError') {
// Do not show notification for AbortError
return;
}

showNotification("Error while fetching address portfolio", "error");

} finally {
setLoadingProtocols(false);
}
Expand Down

0 comments on commit ac38311

Please sign in to comment.