diff --git a/http/http_client.hpp b/http/http_client.hpp
index 1533875..07fa85d 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -148,7 +148,7 @@
     std::function<void(bool, uint32_t, Response&)> callback;
 
 #ifdef BMCWEB_DBUS_DNS_RESOLVER
-    using Resolver = crow::async_resolve::Resolver;
+    using Resolver = async_resolve::Resolver;
 #else
     using Resolver = boost::asio::ip::tcp::resolver;
 #endif
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp
index 5e526ca..2bf5112 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -12,12 +12,37 @@
 #include <iostream>
 #include <memory>
 
-namespace crow
-{
-
 namespace async_resolve
 {
 
+inline bool endpointFromResolveTuple(const std::vector<uint8_t>& ipAddress,
+                                     boost::asio::ip::tcp::endpoint& endpoint)
+{
+    if (ipAddress.size() == 4) // ipv4 address
+    {
+        BMCWEB_LOG_DEBUG << "ipv4 address";
+        boost::asio::ip::address_v4 ipv4Addr(
+            {ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3]});
+        endpoint.address(ipv4Addr);
+    }
+    else if (ipAddress.size() == 16) // ipv6 address
+    {
+        BMCWEB_LOG_DEBUG << "ipv6 address";
+        boost::asio::ip::address_v6 ipv6Addr(
+            {ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3],
+             ipAddress[4], ipAddress[5], ipAddress[6], ipAddress[7],
+             ipAddress[8], ipAddress[9], ipAddress[10], ipAddress[11],
+             ipAddress[12], ipAddress[13], ipAddress[14], ipAddress[15]});
+        endpoint.address(ipv6Addr);
+    }
+    else
+    {
+        BMCWEB_LOG_ERROR << "Resolve failed to fetch the IP address";
+        return false;
+    }
+    return true;
+}
+
 class Resolver
 {
   public:
@@ -75,36 +100,15 @@
             for (const std::tuple<int32_t, int32_t, std::vector<uint8_t>>&
                      resolveList : resp)
             {
-                const std::vector<uint8_t>& ipAddress =
-                    std::get<2>(resolveList);
                 boost::asio::ip::tcp::endpoint endpoint;
-                if (ipAddress.size() == 4) // ipv4 address
-                {
-                    BMCWEB_LOG_DEBUG << "ipv4 address";
-                    boost::asio::ip::address_v4 ipv4Addr(
-                        {ipAddress[0], ipAddress[1], ipAddress[2],
-                         ipAddress[3]});
-                    endpoint.address(ipv4Addr);
-                }
-                else if (ipAddress.size() == 16) // ipv6 address
-                {
-                    BMCWEB_LOG_DEBUG << "ipv6 address";
-                    boost::asio::ip::address_v6 ipv6Addr(
-                        {ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3],
-                         ipAddress[4], ipAddress[5], ipAddress[6], ipAddress[7],
-                         ipAddress[8], ipAddress[9], ipAddress[10],
-                         ipAddress[11], ipAddress[12], ipAddress[13],
-                         ipAddress[14], ipAddress[15]});
-                    endpoint.address(ipv6Addr);
-                }
-                else
-                {
-                    BMCWEB_LOG_ERROR
-                        << "Resolve failed to fetch the IP address";
-                    handler(ec, endpointList);
-                    return;
-                }
                 endpoint.port(portNum);
+                if (!endpointFromResolveTuple(std::get<2>(resolveList),
+                                              endpoint))
+                {
+                    boost::system::error_code ecErr = make_error_code(
+                        boost::system::errc::address_not_available);
+                    handler(ecErr, endpointList);
+                }
                 BMCWEB_LOG_DEBUG << "resolved endpoint is : " << endpoint;
                 endpointList.push_back(endpoint);
             }
@@ -118,5 +122,4 @@
 };
 
 } // namespace async_resolve
-} // namespace crow
 #endif
diff --git a/meson.build b/meson.build
index e9716be..fcc0d7c 100644
--- a/meson.build
+++ b/meson.build
@@ -387,6 +387,7 @@
   'test/include/json_html_serializer.cpp',
   'test/include/http_utility_test.cpp',
   'test/include/human_sort_test.cpp',
+  'test/include/async_resolve_test.cpp',
   'test/include/ibm/configfile_test.cpp',
   'test/include/ibm/lock_test.cpp',
   'test/include/multipart_test.cpp',
diff --git a/test/include/async_resolve_test.cpp b/test/include/async_resolve_test.cpp
new file mode 100644
index 0000000..be1e8a3
--- /dev/null
+++ b/test/include/async_resolve_test.cpp
@@ -0,0 +1,25 @@
+#include "async_resolve.hpp"
+
+#include <boost/asio/ip/tcp.hpp>
+
+#include <gmock/gmock.h>
+
+TEST(AsyncResolve, ipv4Positive)
+{
+    boost::asio::ip::tcp::endpoint ep;
+    ASSERT_TRUE(async_resolve::endpointFromResolveTuple({1, 2, 3, 4}, ep));
+    EXPECT_TRUE(ep.address().is_v4());
+    EXPECT_FALSE(ep.address().is_v6());
+
+    EXPECT_EQ(ep.address().to_string(), "1.2.3.4");
+}
+
+TEST(AsyncResolve, ipv6Positive)
+{
+    boost::asio::ip::tcp::endpoint ep;
+    ASSERT_TRUE(async_resolve::endpointFromResolveTuple(
+        {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, ep));
+    EXPECT_FALSE(ep.address().is_v4());
+    EXPECT_TRUE(ep.address().is_v6());
+    EXPECT_EQ(ep.address().to_string(), "102:304:506:708:90a:b0c:d0e:f10");
+}
