1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(quality) properly handle project not found exception

This commit is contained in:
Sylvain 2023-01-11 09:07:06 +01:00
parent 473aedbdcb
commit 6433767846

View File

@ -30,5 +30,7 @@ class OpenlabWorker
logger.debug ['Openlab sync', 'RESPONSE ERROR', response.inspect] unless response.success?
rescue Errno::ECONNREFUSED => e
logger.warn "Unable to connect to OpenProject, maybe the dev instance is not running: #{e}" if Rails.env.development?
rescue ActiveRecord::RecordNotFound => e
logger.warn "#{e.message}: Project #{project_id} was not found, unable to sync it on OpenLab"
end
end