                             return
                         }
                     }
-                    let userInfo = [
-                        NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
-                        NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
-                        NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
-                    ]
-                    completionHandler(games: nil, error: NSError(domain: "HitboxAPI", code: 3, userInfo: userInfo))
+                    completionHandler(games: nil, error: .JSONError)
                     return
                 }
                 else {
-                    let userInfo = [
-                        NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
-                        NSLocalizedFailureReasonErrorKey: String("The operation returned an error : %@", response.result.error.debugDescription),
-                        NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided channel is valid")
-                    ]
-                    completionHandler(games: nil, error: NSError(domain: "HitboxAPI", code: 1, userInfo: userInfo))
+                    completionHandler(games: nil, error: .URLError)
                     return
                 }
         }
     }
     
-    static func getLiveStreams(forGame gameid: Int, offset: Int, limit: Int, completionHandler: (streams: [HitboxMedia]?, error: NSError?) -> ()) {
+    static func getLiveStreams(forGame gameid: Int, offset: Int, limit: Int, completionHandler: (streams: [HitboxMedia]?, error: HitboxError?) -> ()) {
         let urlString = "https://api.hitbox.tv/media/live/list"
         
         Alamofire.request(.GET, urlString, parameters:

                        return
                    }
                }
                let userInfo = [
                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
                    NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
                ]
                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 3, userInfo: userInfo))
                return
            }
            else {
                let userInfo = [
                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
                    NSLocalizedFailureReasonErrorKey: String("The operation returned an error : %@", response.result.error.debugDescription),
                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided channel is valid")
                ]
                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 1, userInfo: userInfo))
                return
            }
        }
    }
    
    static func getLiveStreams(offset: Int, limit: Int, completionHandler: (streams: [HitboxMedia]?, error: NSError?) -> ()) {
        let urlString = "https://api.hitbox.tv/media/live/list"
        
        Alamofire.request(.GET, urlString, parameters:

                        return
                    }
                }
                completionHandler(streams: nil, error: .JSONError)
                return
            }
            else {
                completionHandler(streams: nil, error: .URLError)
                return
            }
        }
