       onError: onError
     )
   }
-  
+
   static func handleSuccess(data: NSData,
     response: NSHTTPURLResponse,
     onSuccess: (UIImage)->(),
     onError: (NSError, NSHTTPURLResponse?)->()) {
-      
+
     // Show error if response code is not 200
     if response.statusCode != 200 {
       onError(MoaHttpImageErrors.HttpStatusCodeIsNot200.new, response)
       return
     }
-    
+
     // Ensure response has the valid MIME type
     if let mimeType = response.MIMEType {
       if !validMimeType(mimeType) {

public enum MoaHttpErrors: Int {
  /// Incorrect URL is supplied.
  case InvalidUrlString = -1
  
  internal var new: NSError {
    return NSError(domain: "MoaHttpErrorDomain", code: rawValue, userInfo: nil)
  }

      onError(error, response)
      return
    }

    if let image = UIImage(data: data) {
      onSuccess(image)
    } else {
