Creating a new group creates returns 500 if Mattermost SSL verification failed
Summary
When creating a group and checking the "Create a Mattermost team for this group" option with
Steps to reproduce
- Set up GitLab and Mattermost without a valid SSL connection
- Create a new group with option to "Create a Mattermost team for this group"
What is the current bug behavior?
500 error
What is the expected correct behavior?
The error should be handled and communicated to the user.
Relevant logs and/or screenshots
Processing by GroupsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "group"=>{"path"=>"newgroup", "name"=>"newgroup", "description"=>"test", "visibility_level"=>"0", "create_chat_team"=>"true"}}
Completed 500 Internal Server Error in 52ms (ActiveRecord: 2.2ms | Elasticsearch: 0.0ms)
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed):
lib/mattermost/session.rb:76:in `block in get'
lib/mattermost/session.rb:161:in `handle_exceptions'
lib/mattermost/session.rb:75:in `get'
lib/mattermost/session.rb:111:in `oauth_uri'
lib/mattermost/session.rb:89:in `create'
lib/mattermost/session.rb:39:in `block in with_session'
lib/mattermost/session.rb:145:in `with_lease'
lib/mattermost/session.rb:38:in `with_session'
lib/mattermost/client.rb:12:in `with_session'
lib/mattermost/client.rb:38:in `session_post'
lib/mattermost/team.rb:11:in `create'
app/services/mattermost/create_team_service.rb:9:in `execute'
app/services/groups/create_service.rb:30:in `execute'
app/controllers/groups_controller.rb:32:in `create'
lib/gitlab/i18n.rb:46:in `with_locale'
lib/gitlab/i18n.rb:52:in `with_user_locale'
app/controllers/application_controller.rb:334:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/readonly_geo.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
GitLab environment info
9.5.4-ee