Skip to content

membersOnlyOf

membersOnlyOf(error): MembersOnlyBody | null

The typed body of a 403 members_only, or null for any other error. This is how a presentation app tells “show the unlock page” from a failure:

try { return await content.resolveLocation(location, { membership }) }
catch (error) { const gated = membersOnlyOf(error); if (gated) return renderUnlock(gated); throw error }

unknown

MembersOnlyBody | null