             let httpResponse = response as! NSHTTPURLResponse
             
             if (httpResponse.statusCode > 400) {
-                let responseError = NSError(domain: "com.otanistudio.NaiveHTTP.error", code: 400, userInfo: [NSLocalizedFailureReasonErrorKey: "400 or above error", NSLocalizedDescriptionKey: "HTTP Error \(httpResponse.statusCode)"])
+                let responseError = NSError(domain: self!.errorDomain, code: 400, userInfo: [NSLocalizedFailureReasonErrorKey: "400 or above error", NSLocalizedDescriptionKey: "HTTP Error \(httpResponse.statusCode)"])
                 failure!(postError: responseError)
                 return
             }

        
        let url: NSURL =  NaiveHTTP.normalizedURL(uri: uri, params: params)
        
        urlSession.dataTaskWithURL(url) { (responseData: NSData?, response: NSURLResponse?, error: NSError?) -> Void in
            
            if (error != nil) {
                failure!(error: error!)

        do {
            try request.HTTPBody = JSON(postObject).rawData()
        } catch {
            let postObjectError = NSError(domain: self.errorDomain, code: -1, userInfo: [NSLocalizedFailureReasonErrorKey: "failed to convert postObject to JSON"])
            failure!(postError: postObjectError)
        }
        
        urlSession.dataTaskWithRequest(request) { [weak self](data, response, error) -> Void in
            if error != nil {
                failure!(postError: error!)
                return
