[android][database] 'on' cancellation now correctly use internal error parser

This commit is contained in:
Salakar 2017-08-14 18:40:11 +01:00
parent b068b4ff42
commit 98ebd8bf66
1 changed files with 2 additions and 6 deletions

View File

@ -256,16 +256,12 @@ public class RNFirebaseDatabaseReference {
*
* @param error
*/
private void handleDatabaseError(String queryKey, final DatabaseError error) {
WritableMap errMap = Arguments.createMap();
private void handleDatabaseError(String queryKey, DatabaseError error) {
WritableMap errMap = RNFirebaseDatabase.getJSError(error);
errMap.putInt("refId", refId);
errMap.putString("path", path);
errMap.putString("appName", appName);
errMap.putString("queryKey", queryKey);
errMap.putInt("code", error.getCode());
errMap.putString("details", error.getDetails());
errMap.putString("message", error.getMessage());
Utils.sendEvent(reactContext, "database_cancel_event", errMap);
}