@@ -133,14 +133,19 @@ class PlaylistsServerAPI implements PlaylistsRestAPI {
133133 return ClientAPI . responseError (
134134 UserError . from (
135135 new Error ( `Rundown playlist does not exist` ) ,
136- UserErrorMessage . RundownPlaylistNotFound
137- ) ,
138- 404
136+ UserErrorMessage . RundownPlaylistNotFound ,
137+ undefined ,
138+ 404
139+ )
139140 )
140141 if ( rundownPlaylist . currentPartInfo === null )
141142 return ClientAPI . responseError (
142- UserError . from ( Error ( `No active Part in ${ rundownPlaylistId } ` ) , UserErrorMessage . PartNotFound ) ,
143- 412
143+ UserError . from (
144+ Error ( `No active Part in ${ rundownPlaylistId } ` ) ,
145+ UserErrorMessage . PartNotFound ,
146+ undefined ,
147+ 412
148+ )
144149 )
145150
146151 const result = await ServerClientAPI . runUserActionInLogForPlaylistOnWorker (
@@ -172,25 +177,28 @@ class PlaylistsServerAPI implements PlaylistsRestAPI {
172177 return ClientAPI . responseError (
173178 UserError . from (
174179 new Error ( `Rundown playlist does not exist` ) ,
175- UserErrorMessage . RundownPlaylistNotFound
176- ) ,
177- 404
180+ UserErrorMessage . RundownPlaylistNotFound ,
181+ undefined ,
182+ 404
183+ )
178184 )
179185 if ( ! rundownPlaylist . activationId )
180186 return ClientAPI . responseError (
181187 UserError . from (
182188 new Error ( `Rundown playlist ${ rundownPlaylistId } is not currently active` ) ,
183- UserErrorMessage . InactiveRundown
184- ) ,
185- 412
189+ UserErrorMessage . InactiveRundown ,
190+ undefined ,
191+ 412
192+ )
186193 )
187194 if ( ! rundownPlaylist . currentPartInfo )
188195 return ClientAPI . responseError (
189196 UserError . from (
190197 new Error ( `Rundown playlist ${ rundownPlaylistId } must be playing` ) ,
191- UserErrorMessage . NoCurrentPart
192- ) ,
193- 412
198+ UserErrorMessage . NoCurrentPart ,
199+ undefined ,
200+ 412
201+ )
194202 )
195203
196204 return ServerClientAPI . runUserActionInLogForPlaylistOnWorker (
@@ -214,8 +222,7 @@ class PlaylistsServerAPI implements PlaylistsRestAPI {
214222 )
215223 } else {
216224 return ClientAPI . responseError (
217- UserError . from ( new Error ( `No adLib with Id ${ adLibId } ` ) , UserErrorMessage . AdlibNotFound ) ,
218- 412
225+ UserError . from ( new Error ( `No adLib with Id ${ adLibId } ` ) , UserErrorMessage . AdlibNotFound , undefined , 412 )
219226 )
220227 }
221228 }
@@ -242,17 +249,22 @@ class PlaylistsServerAPI implements PlaylistsRestAPI {
242249 ] )
243250 if ( ! bucket ) {
244251 return ClientAPI . responseError (
245- UserError . from ( new Error ( `Bucket ${ bucketId } not found` ) , UserErrorMessage . BucketNotFound ) ,
246- 412
252+ UserError . from (
253+ new Error ( `Bucket ${ bucketId } not found` ) ,
254+ UserErrorMessage . BucketNotFound ,
255+ undefined ,
256+ 412
257+ )
247258 )
248259 }
249260 if ( ! bucketAdlib && ! bucketAdlibAction ) {
250261 return ClientAPI . responseError (
251262 UserError . from (
252263 new Error ( `No adLib with Id ${ externalId } , in bucket ${ bucketId } ` ) ,
253- UserErrorMessage . AdlibNotFound
254- ) ,
255- 412
264+ UserErrorMessage . AdlibNotFound ,
265+ undefined ,
266+ 412
267+ )
256268 )
257269 }
258270
@@ -477,17 +489,19 @@ class PlaylistsServerAPI implements PlaylistsRestAPI {
477489 return ClientAPI . responseError (
478490 UserError . from (
479491 Error ( `Rundown playlist ${ rundownPlaylistId } does not exist` ) ,
480- UserErrorMessage . RundownPlaylistNotFound
481- ) ,
482- 412
492+ UserErrorMessage . RundownPlaylistNotFound ,
493+ undefined ,
494+ 412
495+ )
483496 )
484497 if ( ! rundownPlaylist . currentPartInfo ?. partInstanceId || ! rundownPlaylist . activationId )
485498 return ClientAPI . responseError (
486499 UserError . from (
487500 new Error ( `Rundown playlist ${ rundownPlaylistId } is not currently active` ) ,
488- UserErrorMessage . InactiveRundown
489- ) ,
490- 412
501+ UserErrorMessage . InactiveRundown ,
502+ undefined ,
503+ 412
504+ )
491505 )
492506
493507 return ServerClientAPI . runUserActionInLogForPlaylistOnWorker (
0 commit comments