Cblite 2.1 Error code when Session gets expired using token based sync mechanism


#1

What exact error code i need to check to again generate the session id when sync stopped syncing.

I am working on Session and token based session implementation in CBlite 2.1 and i am struggling to find the exact error code , so that when this error code comes , i need to again generate the

  1. Access token
    2.Session id ( request for new session id )

Here is the code i am using:

//SESSION ID AND ACCESS TOKEN EXPIRATION CHEKING AND PERFORM ACTION ACCORDINGLY
if let error = change.status.error as NSError? {
switch error.code {
case nil:
print("[Couchbase Sync Debug] no error")
break
case 50 … 54:
print("[Couchbase Sync Debug] OFFLINE MODE,NETWORK OFFLINE")
break
case 10401 … 10500://ACCESS TOKEN GETS EXPIRED. --i need clarification on this??
}
}

Kindly help in resolving this issue.