File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,13 @@ alias IV = Invidious
6060CONFIG = Config .load
6161HMAC_KEY = CONFIG .hmac_key
6262
63- PG_DB = DB .open CONFIG .database_url
63+ PG_DB = begin
64+ DB .open CONFIG .database_url
65+ rescue ex
66+ puts " Failed to connect to PostgreSQL database: #{ ex.cause.try & .message } "
67+ puts " Check your 'config.yml' database settings or PostgreSQL settings."
68+ exit(1 )
69+ end
6470ARCHIVE_URL = URI .parse(" https://archive.org" )
6571PUBSUB_URL = URI .parse(" https://pubsubhubbub.appspot.com" )
6672REDDIT_URL = URI .parse(" https://www.reddit.com" )
@@ -221,8 +227,8 @@ error 404 do |env|
221227 Invidious ::Routes ::ErrorRoutes .error_404(env)
222228end
223229
224- error 500 do |env , ex |
225- error_template(500 , ex )
230+ error 500 do |env , exception |
231+ error_template(500 , exception )
226232end
227233
228234static_headers do |env |
You can’t perform that action at this time.
0 commit comments