diff --git a/web/app/components/plugins/marketplace/creator-profile/__tests__/data.server.spec.ts b/web/app/components/plugins/marketplace/creator-profile/__tests__/data.server.spec.ts index 66dd5702b91..3946ab920f2 100644 --- a/web/app/components/plugins/marketplace/creator-profile/__tests__/data.server.spec.ts +++ b/web/app/components/plugins/marketplace/creator-profile/__tests__/data.server.spec.ts @@ -183,6 +183,26 @@ describe('loadCreatorProfile', () => { ).resolves.toBeNull() }) + it('rethrows when the primary creator request fails', async () => { + mocks.creatorDetail.mockRejectedValue(new Error('creator request timed out')) + + await expect( + loadCreatorProfile({ uniqueHandle: 'slow-creator', locale: 'en-US' }), + ).rejects.toThrow('creator request timed out') + }) + + it('rethrows when the organization request fails', async () => { + mocks.organizationDetail.mockRejectedValue(new Error('organization request timed out')) + + await expect( + loadCreatorProfile({ + uniqueHandle: 'slow-org', + publisherType: 'organization', + locale: 'en-US', + }), + ).rejects.toThrow('organization request timed out') + }) + it('maps organizations to the shared creator profile shape', async () => { mocks.organizationDetail.mockResolvedValue({ data: { diff --git a/web/app/components/plugins/marketplace/creator-profile/data.server.ts b/web/app/components/plugins/marketplace/creator-profile/data.server.ts index d569f4dc3ba..c442d00cb54 100644 --- a/web/app/components/plugins/marketplace/creator-profile/data.server.ts +++ b/web/app/components/plugins/marketplace/creator-profile/data.server.ts @@ -104,7 +104,8 @@ const loadCreatorProfileCached = cache( getPublisherTemplates(uniqueHandle, sortField, sortOrder), ]) - const creator = creatorResult.status === 'fulfilled' ? creatorResult.value : undefined + if (creatorResult.status === 'rejected') throw creatorResult.reason + const creator = creatorResult.value if (!creator) return null const plugins: MarketplacePlugin[] =