Commit 19ce2351 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'add-logger-to-eks-setup' into 'master'

Add rails logger to debug EKS errors

See merge request gitlab-org/gitlab!39388
parents 4ef38b5e a10d7c4f
......@@ -23,7 +23,9 @@ module Clusters
@role = create_or_update_role!
Response.new(:ok, credentials)
rescue *ERRORS
rescue *ERRORS => e
Gitlab::ErrorTracking.track_exception(e)
Response.new(:unprocessable_entity, {})
end
......
......@@ -53,6 +53,12 @@ RSpec.describe Clusters::Aws::AuthorizeRoleService do
expect(subject.status).to eq(:unprocessable_entity)
expect(subject.body).to eq({})
end
it 'logs the error' do
expect(::Gitlab::ErrorTracking).to receive(:track_exception)
subject
end
end
context 'cannot create role' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment