You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
While exploring the "patch" requests (see #321), I realised you cannot test if some properties are present in the FirebaseObject / event. Consider this code:
FirebaseObject event = Firebase.readEvent();
String v = event.getString('nonexistingproperty'); // v = ""
println(event.error()); // prints "failed to convert to string"
v = event.getString('existingproperty'); // v = "value of existingproperty"
println(event.error()); // still prints "failed to convert to string"
The main issue here is that you can only test once if a property exists or not using FirebaseObject#failed() or FirebaseObject#success(): once the error message is set in the FirebaseObject, it is never reset.