I have one more problem. I use the login and registration functions to register or login as a user. Basically it works and I get nice Error Messages, when i enter some info wrong, but, i do not get the Error Code.
In your Docu, you write, that the message / error code can be retrieved by:
err.message
err.statusCode
err.message works (i get the message), but err.statusCode is ALWAYS “undefined”.
It seems, that the err variable contains just the string and is not really an object (otherwise chrome would show me some expand / drill down options).
I believe the property name is errorCode (need to correct it in our docs). You can confirm it with the following code: console.log( JSON.stringify( err ) );
Hi Mark!
sorry, forgot to stringify Seems that the right poroperty is called “code”
Here the output:
{“status”:400,“headers”:{“content-type”:“application/json”},“message”:“Unable to register user. Missing required property value for ‘password’”,“code”:3041}