 
 public extension Error {
     public func show() {
-        ErrorAlertView.shared.showError(localizedDescription)
+        ErrorAlertView.shared.showError(self)
     }
     
     public var jsonString: String? {


public extension NSError {
    public func show() {
        ErrorAlertView.shared.showError(localizedDescription)
    }
    
    public var jsonString: String? {

    var alert: UIAlertView!
    var isShowing: Bool = false
    
    func showError(_ error: Error?) {
        DispatchQueue.main.async(execute: {
            guard (error as NSError?)?.code != NSURLErrorCancelled && UIApplication.shared.applicationState == .active else {
                return
            }
            
            self.dismiss()
            self.alert = UIAlertView(title: "Error", message: error?.localizedDescription, delegate: self, cancelButtonTitle: "OK")
            self.alert.show()
            self.isShowing = true
        })
