Open cydrobolt opened 8 years ago
Hi, yes please!
I’ve just been starting to use Polr and all I got was "Whoops, looks like something went wrong.“. That’s indeed not too helpful…
It took me quite some time to find the culprit. I did not get a meaningful error message before running the manual installer after having deleted the already created database tables. And that wasn’t the first thing I tried. 🙄
Off topic in this issue but maybe good to know: my database user was missing the REFERENCES privilege which is required to create foreign keys since MySQL 5.7.
Unhelpful messages are always the worst :(
You can turn on APP_DEBUG=true
to display more helpful error messages. By default, APP_DEBUG
is off in production mode, after the setup script is ran.
Thanks for the tip regarding the REFERENCES
privilege :)
I might jump on this one - it makes sense to test the DB connection before writing out to the config file, and at least allow the user to try again. I've found while working on the docker implementation that a failed install is both a pain to correct (I have to wipe the storage volume and start over) and hard to debug (there's no immediate understanding that your db connection settings were wrong and easily correctable).
This seems to be relevant: https://stackoverflow.com/questions/33432752/laravel-5-1-checking-a-database-connection
I'll take a look at catching common errors and send a PR
Although
APP_DEBUG
is set to true during setup, showing stack traces when errors occur, it may be more helpful to catch specific errors (e.g incorrect database error) and show more helpful information.