Fault -1009

I am working on an app and testing what happens if the internet connection has be disabled or the user is outside a service coverage area.
When I disable wifi and try to connect the iOS simulator to the Backendless server I get one of two responses.

  1. Certain methods like find will return the following faultCode.
Server reported an error: Optional(FAULT = '-1009' [NSURLErrorDomain] <The Internet connection appears to be offline.> )

While this makes sense, I do not see in the docs where the “-1009” fault is listed. I see that there are a number of positive value fault code numbers but I do not see any negative numbers. Is there additional information on fault number above and others like it in docs?

  1. If I call isValidUserToken a bool is returned and and there is not faultCode. Why does this not return a faultCode?

Take care,

This behavior is weird (returning boolean instead of error in offline mode). We’ll investigate the reasons to fix it in the upcoming releases.
Thanks for reporting!

Hi Jon,

The -1009 error code comes from the OS. Here’s a discussion about it on SO:

As for the question on IsValidUserToken, it returns a boolean if there is no currentUser or saved user token:

Otherwise, it makes a remote call to the server and in that case, it would return an error when there is no network connectivity.


Thanks Mark. I reported this as an error that is now being worked on. When there is no current user and no connectivity, the API returns false. Based on the reply I got from the other post this was noted as an error, which would be fixed in a future release.

Jon, do you happen to have a link to the other post? I just want to make sure we’re not providing conflicting responses.

I do. Sorry for the duplication. I thought it could be a potential problem so reported it there. http://support.backendless.com/t/potential-problem-with-isvalidusertoken