mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added graceful handling of suggested profile errors in admin-x-activitypub (#21366)
no refs Added graceful handling of suggested profile errors in admin-x-activitypub
This commit is contained in:
parent
f214213859
commit
94584489b4
1 changed files with 7 additions and 2 deletions
|
@ -323,9 +323,14 @@ export function useSuggestedProfiles(handle: string, handles: string[]) {
|
|||
async queryFn() {
|
||||
const siteUrl = await getSiteUrl();
|
||||
const api = createActivityPubAPI(handle, siteUrl);
|
||||
return Promise.all(
|
||||
|
||||
return Promise.allSettled(
|
||||
handles.map(h => api.getProfile(h))
|
||||
);
|
||||
).then((results) => {
|
||||
return results
|
||||
.filter((result): result is PromiseFulfilledResult<Profile> => result.status === 'fulfilled')
|
||||
.map(result => result.value);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue