Wire team, user, persona, FAQ, and ratings flows to backend endpoints; rebuild profile and user detail views with learning activity and subscriptions; fetch Vimeo lesson duration on module cards; add shared filters, permissions helpers, and notification UX improvements. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
502 B
TypeScript
13 lines
502 B
TypeScript
export function getPersonaApiErrorMessage(error: unknown, fallback: string): string {
|
|
const data = (error as { response?: { data?: { message?: string; error?: string } } })
|
|
?.response?.data
|
|
return data?.error ?? data?.message ?? fallback
|
|
}
|
|
|
|
export function isPersonaForbiddenError(error: unknown): boolean {
|
|
return (error as { response?: { status?: number } })?.response?.status === 403
|
|
}
|
|
|
|
export const PERSONAS_FORBIDDEN_MESSAGE =
|
|
"You don't have permission to access the persona catalog"
|