I've been trying to build my docs using GitHub actions and running into the exception thrown here. The problem is that this hides the real error and makes every error look like it's a connection issue.
try {
$driver->beginTransaction();
} catch (PDOException $e) {
throw new \Exception(
"Failed to connect to database connection '$connection'." .
" Is the database running?" .
" If you aren't using this database, remove it from the `database_connections_to_transact` config array."
);
}
In this instance I received an exception with the message Failed to connect to the database connection 'pgsql'. However the actual issue was that I hadn't run my database migrations prior to generating the docs.
I wonder if this thrown Exception should include the message from the PDOException, or instead don't catch the PDOException.
Scribe version
4.29.0
PHP version
8.3.0
Framework
Laravel
Framework version
10.39.0
Scribe config
What happened?
I've been trying to build my docs using GitHub actions and running into the exception thrown here. The problem is that this hides the real error and makes every error look like it's a connection issue.
In this instance I received an exception with the message
Failed to connect to the database connection 'pgsql'
. However the actual issue was that I hadn't run my database migrations prior to generating the docs.I wonder if this thrown
Exception
should include the message from thePDOException
, or instead don't catch thePDOException
.Docs