Prevent Runner sync errors to be reported to Sentry, increase log level

This commit is contained in:
Sebastian Serth
2022-08-12 17:16:21 +02:00
parent be9cbedadf
commit 345df747bd

View File

@ -172,8 +172,7 @@ class ExecutionEnvironmentsController < ApplicationController
begin
Runner.strategy_class.sync_environment(@execution_environment)
rescue Runner::Error => e
Rails.logger.debug { "Runner error while synchronizing execution environment with id #{@execution_environment.id}: #{e.message}" }
Sentry.capture_exception(e)
Rails.logger.warning { "Runner error while synchronizing execution environment with id #{@execution_environment.id}: #{e.message}" }
redirect_to @execution_environment, alert: t('execution_environments.index.synchronize.failure', error: e.message)
else
redirect_to @execution_environment, notice: t('execution_environments.index.synchronize.success')