summaryrefslogtreecommitdiff
path: root/spec/lib/sentry/client_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/sentry/client_spec.rb')
-rw-r--r--spec/lib/sentry/client_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/sentry/client_spec.rb b/spec/lib/sentry/client_spec.rb
index ca2b17b44e0..8101664d34f 100644
--- a/spec/lib/sentry/client_spec.rb
+++ b/spec/lib/sentry/client_spec.rb
@@ -192,6 +192,15 @@ describe Sentry::Client do
end
end
+ context 'sentry api response too large' do
+ it 'raises exception' do
+ deep_size = double('Gitlab::Utils::DeepSize', valid?: false)
+ allow(Gitlab::Utils::DeepSize).to receive(:new).with(sentry_api_response).and_return(deep_size)
+
+ expect { subject }.to raise_error(Sentry::Client::ResponseInvalidSizeError, 'Sentry API response is too big. Limit is 1 MB.')
+ end
+ end
+
it_behaves_like 'maps exceptions'
end