diff --git a/config/initializers/zzz_check_api_version.rb b/config/initializers/zzz_check_api_version.rb index 6837084e3aadf8aab7d5804a93a94e3134c89886..2579085ce0cbcf377a5d360ea7d4ec88e844acca 100644 --- a/config/initializers/zzz_check_api_version.rb +++ b/config/initializers/zzz_check_api_version.rb @@ -12,6 +12,14 @@ if API_REQUIRED Rails.logger.error "schleuder-api-daemon is not running! '#{exc}'. This schleuder-web will be very useless without schleuder-api-daemon!" rescue ActiveResource::BadRequest => exc Rails.logger.error "schleuder-api-daemon returned HTTP status code 400: '#{exc}'. Please have a look at its output to find out about the causal problem. This schleuder-web will be very useless without schleuder-api-daemon!" + rescue ActiveResource::UnauthorizedAccess => exc + Rails.logger.error "Authentication failed with schleuder-api-daemon! Please check that the configured `api_key` is correct (in config/schleuder-web.yml)" + rescue ActiveResource::SSLError => exc + if exc.message.include?("certificate verify failed") + Rails.logger.error "Verifying the certificate of schleuder-api-daemon failed! Please check that the configured `tls_fingerprint` is correct (in config/schleuder-web.yml)." + else + Rails.logger.error "An unknow SSL-related error occurred while contacting schleuder-api-daemon: #{exc}" + end rescue StandardError => exc Rails.logger.error "An unknown error occurred while contacting schleuder-api-daemon: #{exc}" end