Hi
I have a very tiny wrapper around a internal tool, communicating via HTTP
def post(url:)
payload = { url: url }.to_json
Try do
uri = URI(settings.url)
client = Net::HTTP.new(uri.host, uri.port).tap do |http|
http.use_ssl = true
http.read_timeout = 1 # in seconds
http.open_timeout = 1
http.write_timeout = 1
end
client.post('/v1/link', payload, HEADERS)
end.to_result
end
It works fine in the specs where I do simulate the timeout either via webmock or using rspec spies, but in production the Try block seems like not working according to Sentry:
something I noticed is the description:
Crashed in non-app:
net/protocol.rbinrbuf_fill
is there something I can do about it?
