Commit fed75299 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'deprecated-original-exception' into 'master'

Fix deprecation: #original_exception is deprecated. Use #cause instead.

See merge request gitlab-org/gitlab-ee!9141
parents 0cba7657 a6c3df47
---
title: 'Fix deprecation: #original_exception is deprecated. Use #cause instead.'
merge_request: 9141
author: Jasper Maes
type: other
......@@ -138,7 +138,7 @@ module Gitlab
when ActiveRecord::StatementInvalid, ActionView::Template::Error
# After connecting to the DB Rails will wrap query errors using this
# class.
connection_error?(error.original_exception)
connection_error?(error.cause)
when *CONNECTION_ERRORS
true
else
......@@ -151,8 +151,8 @@ module Gitlab
end
def serialization_failure?(error)
if error.respond_to?(:original_exception)
serialization_failure?(error.original_exception)
if error.cause
serialization_failure?(error.cause)
else
error.is_a?(PG::TRSerializationFailure)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment