             return "Please enter the name of a World of Warcraft realm."
         }
 
-        let apiResponse = try self.drop.client.get(uri, query: ["locale" : "en_US", "apikey" : apiKey])
-        guard let realms = apiResponse.json?["realms"]?.pathIndexableArray else
-        {
-            return "No realms"
-        }
-
-        guard let selectedRealm = realms.filter(
-        { (realm) -> Bool in
-            realm["name"]?.string?.lowercased() == text.lowercased()
-        }).first
-        else
-        {
-            return "\(text) is not a valid realm"
-        }
-
-        let realmName = selectedRealm["name"]?.string ?? "Invalid name"
-        let status = selectedRealm["status"]?.bool ?? false
-
-        let message = "\(realmName) \(status ? "is" : "is not") online."
-        let payload = try JSON(node:
-            [
-                "response_type" : "ephemeral",
-                "text" : message
-            ])
-
-        return payload
+        do
+        {
+            let apiResponse = try self.drop.client.get(uri, query: ["locale" : "en_US", "apikey" : apiKey])
+            guard let realms = apiResponse.json?["realms"]?.pathIndexableArray else
+            {
+                return "No realms"
+            }
+
+            guard let selectedRealm = realms.filter(
+                { (realm) -> Bool in
+                    realm["name"]?.string?.lowercased() == text.lowercased()
+            }).first
+                else
+            {
+                return "\(text) is not a valid realm"
+            }
+
+            let realmName = selectedRealm["name"]?.string ?? "Invalid name"
+            let status = selectedRealm["status"]?.bool ?? false
+
+            let message = "\(realmName) \(status ? "is" : "is not") online."
+            let payload = try JSON(node:
+                [
+                    "response_type" : "ephemeral",
+                    "text" : message
+                ])
+            
+            return payload
+        }
+        catch
+        {
+            return "\(error)"
+        }
+
     }
 
     ////////////////////////////////////////////////////////////

        }

        let uri = "https://api.nasa.gov/planetary/apod"
        let apiResponse = try drop.client.get(uri, query: ["api_key": apiKey])

        let title = apiResponse.json?["title"]?.string ?? ""
        let explanation = apiResponse.json?["explanation"]?.string ?? ""
        let imageURL = apiResponse.json?["url"]?.string ?? ""

        let attachments = try JSON(node:
            [
                "title" : title,
                "text" : explanation,
                "image_url" : imageURL,
                "footer" : "NASA"
            ])

        let payload = try JSON(node:
            [
                "response_type" : "in_channel",
                "attachments" : JSON([attachments])
            ])

        return payload
    }

    ////////////////////////////////////////////////////////////

        {
            return "\(error)"
        }
    }

    ////////////////////////////////////////////////////////////
