Skip to content

Commit 7e8a4b5

Browse files
authored
fix: clarify playlist errors and repair font metadata (#277)
1 parent dd17491 commit 7e8a4b5

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

apps/platform/src/routes/rooms.$id/action.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ async function createErrorData(intent: RoomActionIntent, error: Error | null) {
8080
const status = error ? getHttpError(error)?.response.status : null;
8181
let permissionError: string | null = null;
8282
if (apiError?.error === 'song_room_admin_required') {
83-
permissionError = 'Only room admins can add songs here.';
83+
permissionError =
84+
intent === 'addPlaylist'
85+
? 'Only room admins can import playlists here.'
86+
: 'Only room admins can add songs here.';
8487
}
8588
if (intent === 'skip' && !apiError) {
8689
if (status === UNAUTHORIZED_STATUS) {
@@ -103,9 +106,10 @@ async function createErrorData(intent: RoomActionIntent, error: Error | null) {
103106
permissionError ??
104107
(error && getRateLimitMessage(error)) ??
105108
apiError?.message ??
106-
(intent === 'skip'
107-
? 'Failed to skip. Please try again.'
108-
: 'The request failed'),
109+
((intent === 'skip' && 'Failed to skip. Please try again.') ||
110+
(intent === 'addPlaylist' &&
111+
'Failed to import the playlist. Please try again.') ||
112+
'The request failed'),
109113
...(apiError?.error === 'song_room_admin_required' && {
110114
errorAction: 'adminLogin' as const,
111115
}),
0 Bytes
Binary file not shown.
-316 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-1.27 KB
Binary file not shown.

0 commit comments

Comments
 (0)