Discussion:
How can I be apprised of sync errors? (2.0DB021)
Ben Kennedy
2018-03-09 00:29:38 UTC
Permalink
I've deliberately created a document that will be rejected by Sync Gateway (due to non-conformance to the sync function). With my sync in continuous mode, and the log level pumped up high, I can see the error logged:

2018-03-08 16:24:31.325028-0800 Shoebox[7768:21175929] CouchbaseLite Sync ERROR: {2} Got error response to rev biz.1234567890 #2-da774235e8a37f9e803bb687362be1f6648ff22e (seq 52): HTTP 403 'missing channel access'

However, I can't figure out how to get notified about it.

In my replicator change listener, I'm checking `change.status.error`, but it is always nil. The sync activity continues to run as expected between `busy` and `idle`, but never becomes `stopped`.

What am I overlooking?

thanks,

-b
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/39F1F893-D85A-4823-99AD-2E76EFAE7477%40kashoo.com.
For more options, visit https://groups.google.com/d/optout.
Jens Alfke
2018-03-09 01:24:40 UTC
Permalink
Post by Ben Kennedy
However, I can't figure out how to get notified about it.
Yeah, there isn’t a notification. :( I’m sure there’s an issue pending to add one, but it hasn’t been a high priority because, in general, clients shouldn’t be creating documents that fail server validation. (For example, if the server requires a “price” property, and the app doesn’t add one, that’s an app bug.) But I know there are exceptions where a document could be unexpectedly rejected; it just hasn’t surfaced as a high priority to handle yet.

—Jens

Jens Alfke — Mobile Architect — Couchbase, Inc.
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/BA4D3B65-A761-41D2-AAD6-515FDC9F592E%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.
Loading...