Skip to content

Commit 10285e9

Browse files
authored
Merge pull request rails#48111 from adrianna-chang-shopify/ac-trilogy-translate-error-use-match
Use `#include?` with String instead of Regexp for Trilogy conn errors
2 parents 580ad7e + 11cc54d commit 10285e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def translate_connect_error(config, error)
7979
when ER_ACCESS_DENIED_ERROR
8080
ActiveRecord::DatabaseConnectionError.username_error(config[:username])
8181
else
82-
if error.message.include?(/TRILOGY_DNS_ERROR/)
82+
if error.message.include?("TRILOGY_DNS_ERROR")
8383
ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
8484
else
8585
ActiveRecord::ConnectionNotEstablished.new(error.message)

0 commit comments

Comments
 (0)