Skip to content

Commit

Permalink
fix(console): hide error toast for non-existed application in audit l…
Browse files Browse the repository at this point in the history
…ogs (#6168)

* fix(console): hide error toast for non-existed application in audit logs

* chore: add changeset
  • Loading branch information
charIeszhao authored Jul 3, 2024
1 parent c7010bb commit 06ef199
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/good-shrimps-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@logto/console": patch
---

fix a regression bug that error toasts pop up in audit log when logs are associated with deleted applications
2 changes: 1 addition & 1 deletion packages/console/src/components/ApplicationName/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Props = {
function ApplicationName({ applicationId, isLink = false }: Props) {
const isAdminConsole = applicationId === adminConsoleApplicationId;

const fetchApi = useApi({ hideErrorToast: ['entity.not_found'] });
const fetchApi = useApi({ hideErrorToast: ['entity.not_exists_with_id'] });
const fetcher = useSwrFetcher<Application>(fetchApi);
const { data, error } = useSWR<Application, RequestError>(
!isAdminConsole && `api/applications/${applicationId}`,
Expand Down

0 comments on commit 06ef199

Please sign in to comment.