From 98ebd8bf66e16123ae27ebef732f6e0742a6dd3d Mon Sep 17 00:00:00 2001 From: Salakar Date: Mon, 14 Aug 2017 18:40:11 +0100 Subject: [PATCH] [android][database] 'on' cancellation now correctly use internal error parser --- .../firebase/database/RNFirebaseDatabaseReference.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/android/src/main/java/io/invertase/firebase/database/RNFirebaseDatabaseReference.java b/android/src/main/java/io/invertase/firebase/database/RNFirebaseDatabaseReference.java index 52ce3996..653b6be8 100644 --- a/android/src/main/java/io/invertase/firebase/database/RNFirebaseDatabaseReference.java +++ b/android/src/main/java/io/invertase/firebase/database/RNFirebaseDatabaseReference.java @@ -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); }