We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bdfce9 commit 2d4cb35Copy full SHA for 2d4cb35
2 files changed
lib/securenative/event_manager.rb
@@ -82,10 +82,11 @@ def run
82
begin
83
item = @queue.shift
84
res = @http_client.post(item.url, item.body)
85
- if res.code == "401"
+ if res.code == '401'
86
item.retry_sending = false
87
- elsif res.code != "200"
+ elsif res.code != '200'
88
@queue.append(item)
89
+ raise SecureNativeHttpError, res.status_code
90
end
91
SecureNativeLogger.debug("Event successfully sent; #{item.body}")
92
rescue Exception => e
spec/spec_securenative.rb
@@ -22,7 +22,7 @@
22
23
it 'inits sdk with api key and defaults' do
24
SecureNative::SecureNative._flush
25
- api_key = 'API_KEY'
+ api_key = "API_KEY"
26
securenative = SecureNative::SecureNative.init_with_api_key(api_key)
27
options = securenative.options
28
0 commit comments