As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
How do I interpret Android IOException to diagnose the cause of the Kinvey error thrown?
J
James White
started a topic
over 9 years ago
All the examples print out the raw error message. These messages are often not human readable. Is there a list of errors thrown by Kinvey methods, especially fetching and user management-related methods? We need to improve upon this:
In general, documentation/reference of errors thrown in Kinvey communication/business logic and interpreting them in Android is pretty bare. Is this in the works to fix up? If so, how long?
E
Edward
said
over 9 years ago
Hey,
you'll get more information from the exception if you call the `printStackTrace()` method on it. This will dump the entire stack of the exception to the logs, where you can see more details about what the issue might be.
If there is an issue in BL, you can also open up the console, visit the BL add-on, and add/check logging statements there.
Also, if you have a specific exception that you can't figure out you can post it here and I can help explain it.
J
James White
said
over 9 years ago
The printStackTrace() method doesn't actually print out the getDetails().getDebug() string of a KinveyJsonResponseException. Right now I'm doing this to handle BL messages in my app:
if (e.getDetails().getDebug().contains("No user found that matches key.")){
The "No user found that matches key." message comes from our Kinvey BL, and this code works for now. However, the reference documentation for these methods is pretty empty at:
And none of the examples illustrate how to handle Kinvey-related or Kinvey-BL-related errors properly. The possible errors from Kinvey requests are never enumerated in the guide, which would be really helpful.
E
Edward
said
over 9 years ago
Hey,
I can expand upon the KinveyJsonResponseException documentation, but there won't be any specifics I can add it to. This class is used for all exceptions that come from Kinvey, as long as they are formatted in JSON. `Debug` is the field that contains the relevant information specific to the thrown error, whatever it may be.
Doesn't explain how one would access the debug, error, or description fields of this error in Android. Also I think on one of the example outputs the "error" and "debug" fields may be mixed up.
Log.e(TAG, "failed to fetchByFilterCriteria", error);
}
I can't find any examples that catch and gracefully handle multiple types of errors such as not having a user logged in, no internet, no permissions, etc. Are we just supposed to find out what these errors are by creating them? :D
Maybe a section on handling errors in the guide would be best?
E
Edward
said
over 9 years ago
Hey sorry for the delay-- I'm currently in the process of expanding the troubleshooting guide and will be shipping it probably tomorrow.
E
Edward
said
over 9 years ago
Hey I just pushed an update to the troubleshooting guide, can you open it up and let me know if that's what you are looking for?
This is exactly what I was looking for! Thanks for the update. I think this really completes a huge missing area of the guide. In Java/Android, Exceptions are pretty much flow elements, so not having info on them makes things tough.
James White
Log.e(LOGTAG, "Error fetching updates.", e);
CSNotificationFactory.makeToast(mContext, "Error fetching updates: "+e.getMessage());