Blank page returned when unable to connect to database server #131

Closed
adamcaudill opened this Issue Aug 28, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@adamcaudill
Collaborator

adamcaudill commented Aug 28, 2016

Summary

If the application isn't able to connect to its database server, it returns a 500, with a blank page.

Expected Outcome

Display a useful error message, so that there's some indication of what happened.

2016/08/28 22:01:19 [error] 29847#29847: *13650 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: connection in /var/www/beta.example.com/airship/src/config/logger.php on line 38
PHP message: PHP Fatal error:  Uncaught Airship\Alerts\Database\DBException: Could not create a database connection. Please check your username and password. in /var/www/beta.example.com/airship/src/Engine/Database.php:100
Stack trace:
#0 /var/www/beta.example.com/airship/src/Airship.php(384): Airship\Engine\Database::factory('pgsql:host=loca...', 'db_name', '555-555-0199@ex...', Array)
#1 /var/www/beta.example.com/airship/src/Engine/LedgerStorage/DBStore.php(46): Airship\get_database()
#2 /var/www/beta.example.com/airship/src/config/logger.php(41): Airship\Engine\LedgerStorage\DBStore->__construct(NULL, '')
#3 /var/www/beta.example.com/airship/src/config/logger.php(54): {closure}()
#4 /var/www/beta.example.com/airship/src/bootstrap.php(170): require_once('/var/www/beta.a...')
#5 /var/www/beta.example.com/airship/src/public/index.php(91): require_once('/var/www/beta.a...')
#6 {main}
  thrown in /var/www/beta.example.com/airship/src/Engine/Database.php on line 100" while reading response header from upstream, client: 127.0.0.1, server: beta.example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.example.com"
@paragonie-scott

This comment has been minimized.

Show comment
Hide comment
Member

paragonie-scott commented Aug 28, 2016

👍 3bb2307

@paragonie-scott paragonie-scott added this to the Version 1.3.0 milestone Aug 29, 2016

@paragonie-scott paragonie-scott added the bug label Aug 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment