readd error message on failed resolution

This commit is contained in:
HoneyryderChuck 2023-05-01 00:45:35 +01:00
parent 07624e529f
commit b154d97438
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ if RUBY_VERSION >= "2.4.0"
verify_spans(transaction, response, verb: "GET")
crumb = Sentry.get_current_scope.breadcrumbs.peek
assert crumb.category == "httpx"
assert crumb.data == { error: "Can't resolve unexisting", method: "GET", url: uri.to_s }
assert crumb.data == { error: "name or service not known", method: "GET", url: uri.to_s }
end
private

View File

@ -248,7 +248,7 @@ module HTTPX
unless @queries.value?(connection)
@connections.delete(connection)
raise NativeResolveError.new(connection, connection.origin.host)
raise NativeResolveError.new(connection, connection.origin.host, "name or service not known")
end
resolve