0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

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

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

* chore: add changeset
This commit is contained in:
Charles Zhao 2024-07-03 11:44:37 +08:00 committed by GitHub
parent c7010bbaaa
commit 06ef19905b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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}`,