@@ -235,8 +235,13 @@ export default async function handleSetBreakoutConfig(req: Request, res: Respons
235235 duration : 5 ,
236236 position : keyAsset . position ,
237237 } )
238- . then ( )
239- . catch ( ( ) => console . error ( "Error: Cannot trigger particle" ) ) ;
238+ . catch ( ( error ) =>
239+ errorHandler ( {
240+ error,
241+ functionName : "handleSetBreakoutConfig" ,
242+ message : "Error triggering particle effects" ,
243+ } ) ,
244+ ) ;
240245
241246 placeVisitors ( matches , visitorsObj , participants , keyAsset . id ! , breakouts , privateZones ) ;
242247 } , countdown * 1000 ) ;
@@ -341,17 +346,27 @@ export default async function handleSetBreakoutConfig(req: Request, res: Respons
341346
342347 const timeout = setTimeout ( ( ) => {
343348 const world = World . create ( urlSlug , { credentials } ) ;
349+ world . triggerActivity ( { type : WorldActivityType . GAME_ON , assetId } ) . catch ( ( error ) =>
350+ errorHandler ( {
351+ error,
352+ functionName : "handleSetBreakoutConfig" ,
353+ message : "Error triggering world activity" ,
354+ } ) ,
355+ ) ;
344356
345357 world
346358 . triggerParticle ( {
347359 name : "pastelConfetti_fall" ,
348360 duration : 5 ,
349361 position : keyAsset . position ,
350362 } )
351- . then ( )
352- . catch ( ( ) => console . error ( "Error: Cannot trigger particle" ) ) ;
353-
354- world . triggerActivity ( { type : WorldActivityType . GAME_ON , assetId } ) ;
363+ . catch ( ( error ) =>
364+ errorHandler ( {
365+ error,
366+ functionName : "handleSetBreakoutConfig" ,
367+ message : "Error triggering world activity" ,
368+ } ) ,
369+ ) ;
355370
356371 placeVisitors ( matches , visitorsObj , participants , keyAsset . id ! , breakouts , privateZonesAtStart ) ;
357372 } , countdown * 1000 ) ;
0 commit comments