Hope this will help some developers to save some time and frustration.
If you call cloud.registerUser you will get no event.error if:
a) the username already exists
b ) the email already exists
c) the password is shorter than 6 characters
In the documentation the first 2 cases are mentioned, but not the third.
Here is the code I use for registration (I treat all 3 as errors):
function authListener( event ) if ( event.type == "registerUser" ) then if not ( event.error ) then -- in the docs: --handle a successful registration; consider logging them in from here -- wrong ! you are not safe here for login registrationHandler(event) else --code to handle registration failure native.showAlert( "Registration Error!", event.error, {OK} ) end end function registrationHandler( event ) local r = json.decode(event.response) if(r.base~=nil and r.base[1] ~= nil) then -- this is for to short pwd native.showAlert( ERROR, r.base[1] .. ".", { OK }) elseif(r.username~=nil and r.username[1] ~= nil) then native.showAlert( ERROR, USERNAME .. " " .. r.username[1] .. ".", { OK }) elseif(r.email~=nil and r.email[1] ~= nil) then native.showAlert( ERROR, EMAIL .. " " .. r.email[1] .. ".", { OK }) else native.showAlert( INFOS, "Account created.", { OK }) -- now you can login! end end