fullstackreact / react-native-firestack

A firestack v3 react-native implementation
MIT License
715 stars 132 forks source link

Code error not clear #303

Closed jsbranco closed 7 years ago

jsbranco commented 7 years ago

Hi I am using the firestack@3.0.0-rc.3 and I noticed the error codes are not coming in properly. When a user provides incorrect email /password the error code provide is blank, hence I am not able to provide an explanation of the issue to a user.

 firestack.auth().createUserWithEmailAndPassword(email, password)
            .then((data)=> {
                console.log(data);
            }, (error)=>{
                console.log(error);
            })
            .catch(function (error) {
                // Handle Errors here.
                console.log(error);
                var errorCode = error.code;
                var errorMessage = error.message;
                dispatch({type: "LOADING", status: "done"});
                dispatch({type: "TOAST_ERROR", message: errorMessage})
            });
    }

The output is the following:

postState.js:330 Object {type: "@@redux-form/SET_SUBMIT_SUCCEEDED", meta: Object, error: false}
authState.js:106 Object {code: "", message: undefined}

Is anyone facing this issue?

jsbranco commented 7 years ago

Closing the issue has related to : https://github.com/fullstackreact/react-native-firestack/issues/288