Skip to content

Commit ddbb8c4

Browse files
committed
Fix sentry logging
1 parent 57ea2e1 commit ddbb8c4

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

app/lib/deepl/client.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ def translate(text, source_lang, target_lang)
117117
json['translations'][0]['text']
118118
end
119119
end
120-
rescue => e
121-
unless @custom_deepl_account
122-
Sentry.capture_exception(e)
123-
end
124-
nil
125120
end
126121

127122
private
@@ -141,7 +136,9 @@ def request(http_method, endpoint, data = nil)
141136
)
142137
JSON.parse(response)
143138
rescue => e
144-
Sentry.capture_exception(e)
139+
unless @custom_deepl_account
140+
Sentry.capture_exception(e)
141+
end
145142
nil
146143
end
147144
end

0 commit comments

Comments
 (0)