The problem I was having is that I wasn’t receiving the full error object. To do that I changed the code to:
const { username, password, email } = this.state;
axios
.post(`${Config.apiUrl}/wp/v2/users/register`, {
username: username,
password: password,
email: email,
})
.catch(err => {
console.log({err})
});
Which then allowed me to figure out that the error message is contained in:
err.response.data.message
So now I’m all good.