Commit a6c3df47 authored by Jasper Maes's avatar Jasper Maes

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

parent 22d4a103
---
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