Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291717

Migration source database errors are not very useful

$
0
0

Problem/Motivation

If a migration database connection fails you get a very generic error message like

In Connection.php line 197:

  SQLSTATE[HY000] [1045] Access denied for user 'USER'@'IPADDRESS' (using password: YES)

If dealing with a situation with multiple databases that can be very unhelpful.

Steps to reproduce

Run migrate task that hits an unavailable database or uses an incorrect password/username

Proposed resolution

Catch the Database/PDO exception and throw a more detailed exception.
Suggesting something like:

Migration MIGRATIONNAME failed to connect to CONNECTIONNAME:default. SQLSTATE[HY000] [1045] Access denied for user 'USER'@'IPADDRESS' (using password: YES)


Viewing all articles
Browse latest Browse all 291717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>