0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Merge pull request #3690 from sebgie/issue#3659

Improve handling of SQLITE_READONLY
This commit is contained in:
Hannah Wolfe 2014-08-08 14:18:29 +01:00
commit 648b503cff

View file

@ -100,7 +100,13 @@ errors = {
stack = err ? err.stack : null;
err = _.isString(err) ? err : (_.isObject(err) ? err.message : 'An unknown error occurred.');
// Overwrite error to provide information that this is probably a permission problem
// TODO: https://github.com/TryGhost/Ghost/issues/3687
if (err.indexOf('SQLITE_READONLY') !== -1) {
context = "Your database is in read only mode. Visitors can read your blog, but you can't log in or add posts.";
help = "Check your database file and make sure that file owner and permissions are correct.";
}
// TODO: Logging framework hookup
// Eventually we'll have better logging which will know about envs
if ((process.env.NODE_ENV === 'development' ||