File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export default class GaanaSource {
101101 if ( ! / ^ \d + $ / . test ( String ( trackId ) ) ) {
102102 const trackData = await this . getJson ( `/api/songs/${ encodeURIComponent ( trackId ) } ` )
103103 if ( ! trackData ?. track_id ) {
104- throw new Error ( 'Track metadata not found for stream.' )
104+ return { exception : { message : 'Track metadata not found for stream.' , severity : 'common' } }
105105 }
106106 trackId = trackData . track_id
107107 }
@@ -111,13 +111,13 @@ export default class GaanaSource {
111111 )
112112
113113 if ( ! streamData ) {
114- throw new Error ( 'Stream URL not found.' )
114+ return { exception : { message : 'Stream URL not found.' , severity : 'common' } }
115115 }
116116
117117 const hlsUrl = streamData . hlsUrl || streamData . hls_url || null
118118 const url = hlsUrl || streamData . url
119119 if ( ! url ) {
120- throw new Error ( 'No playable stream URL.' )
120+ return { exception : { message : 'No playable stream URL.' , severity : 'common' } }
121121 }
122122
123123 const segments = Array . isArray ( streamData . segments )
You can’t perform that action at this time.
0 commit comments