So what I expected from the code below was that when I get any errors in the request it would do a catch exception, but that is not happening, can anyone help me?
try {
const user = UsersServices.register({name: name, email: email, password: password})
redirectToLogin(true)
} catch (err) {
setError(true)
}
This is the POST I’m using
register: params => Api.post('users/register', params)