If I call the unregister method on a geodatabase, I can it to unregister successfully.
But if, for some reason (say, a bug in my code or something outside my control like someone manually shifting geodatabase files around!), the code tried to unregister a geodatabase that had already been unregistered, how to I access the error message?
In fiddler I can see a JSON response along the lines of... code 404, 'Replica with GUID.... does not exist on the server...' etc. That's fine, but I can't seem to figure out where I can access this error message from within the code?
Well, since the GeodatabaseSyncTask class inherits from RuntimeObject, it has an "error" signal - ArcGIS Runtime SDK for Qt QML API: RuntimeObject Class Reference
This passes through a RuntimeError. In theory, the error should be emitted through this signal, and you should be able to print out the description of the error. Hopefully that is what is happening here, but you never know. If you find a scenario where you aren't getting errors through this signal, but an operation fails silently, then this is likely a bug.
I know you're busy with UC so this probably won't get looked at for a few weeks.... but thought I'd update while I remember...
From my testing, it seems that the RuntimeError object doesn't get populated with anything in this scenario. If I console log
error.category, error.description they are both undefined. The GeodatabaseSyncStatusInfo object's 'status' gets set to a rather generic '5' which just means 'Failed' and doesn't provide any useful info.