Skip to content
Snippets Groups Projects
Commit a73722ae authored by paz's avatar paz
Browse files

More specific error messages for problems with schleuder-api-daemon

parent 283f32c9
Branches
Tags
1 merge request!122Collected changed for v5 and more
Pipeline #204407 failed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment