Skip to content

Commit

Permalink
fix: Sentry 报错忽略个别异常
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Oct 20, 2020
1 parent 6991df1 commit 5adc5cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/initializers/sentry.rb
Expand Up @@ -9,17 +9,18 @@
config.excluded_exceptions += [
'ActionController::RoutingError',
'ActiveRecord::RecordNotFound',
'ActiveRecord::RecordInvalid'
'ActiveRecord::RecordInvalid',
'ActiveRecord::NoDatabaseError',
'PG::ConnectionBad',
]
config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
config.sanitize_fields << 'token'

version = Setting.version
vcs_ref = Setting.vcs_ref
version = "#{version}-#{vcs_ref}" if vcs_ref.present?
config.release = version

if vcs_ref.present?
config.release = "#{version}-#{vcs_ref}"
config.tags = {
docker: true,
docker_tag: ENV['DOCKER_TAG']
Expand Down

0 comments on commit 5adc5cc

Please sign in to comment.