livechat / chat-window-ios

Embeding LiveChat mobile chat window in iOS application
MIT License
24 stars 31 forks source link

How to handle LiveChat errors #11

Closed j-rewerts closed 6 years ago

j-rewerts commented 6 years ago

I've been running into an error NSURLErrorDomain -999 every now and then. It's a fairly harmless error as far as I'm aware, but LiveChat displays the error. I found this by looking in ChatView.swift lines 413-415:

if error.domain == NSURLErrorDomain && error.code == -999 {
    loadingView.displayLoadingError(withMessage: error.localizedDescription)
}

Ideally, I'd like to be able to handle this error myself, or just have it swallowed. I can modify the LiveChat source in my pods is another option I suppose.

From what I've read, the error simply means a request was cancelled, not that the request failed or anything.

Jercik commented 6 years ago

Hi, I've made changes in version 2.0.10 and alert will no longer be shown to users for -999 errors.