diff --git a/apps/api/src/app/bridge/bridge.controller.ts b/apps/api/src/app/bridge/bridge.controller.ts index 61fa91fba4b..134e18baff2 100644 --- a/apps/api/src/app/bridge/bridge.controller.ts +++ b/apps/api/src/app/bridge/bridge.controller.ts @@ -50,13 +50,11 @@ export class BridgeController { @Get('/status') @UseGuards(UserAuthGuard) async health(@UserSession() user: UserSessionData) { - const result = await this.getBridgeStatus.execute( + return this.getBridgeStatus.execute( GetBridgeStatusCommand.create({ environmentId: user.environmentId, }) ); - - return result; } @Post('/preview/:workflowId/:stepId') diff --git a/apps/api/src/app/bridge/usecases/get-bridge-status/get-bridge-status.usecase.ts b/apps/api/src/app/bridge/usecases/get-bridge-status/get-bridge-status.usecase.ts index 62e44f52300..7d92b2181bb 100644 --- a/apps/api/src/app/bridge/usecases/get-bridge-status/get-bridge-status.usecase.ts +++ b/apps/api/src/app/bridge/usecases/get-bridge-status/get-bridge-status.usecase.ts @@ -11,25 +11,14 @@ export class GetBridgeStatus { constructor(private executeBridgeRequest: ExecuteBridgeRequest) {} async execute(command: GetBridgeStatusCommand): Promise { - try { - const response = (await this.executeBridgeRequest.execute( - ExecuteBridgeRequestCommand.create({ - environmentId: command.environmentId, - action: GetActionEnum.HEALTH_CHECK, - workflowOrigin: WorkflowOriginEnum.EXTERNAL, - statelessBridgeUrl: command.statelessBridgeUrl, - retriesLimit: 1, - }) - )) as ExecuteBridgeRequestDto; - - return response; - } catch (err: any) { - Logger.error( - `Failed to verify Bridge endpoint for environment ${command.environmentId} with error: ${(err as Error).message || err}`, - (err as Error).stack, - LOG_CONTEXT - ); - throw err; - } + return (await this.executeBridgeRequest.execute( + ExecuteBridgeRequestCommand.create({ + environmentId: command.environmentId, + action: GetActionEnum.HEALTH_CHECK, + workflowOrigin: WorkflowOriginEnum.EXTERNAL, + statelessBridgeUrl: command.statelessBridgeUrl, + retriesLimit: 1, + }) + )) as ExecuteBridgeRequestDto; } }