mesg-foundation / js-sdk

Javascript mono-repo with all the tools to interact with MESG
https://mesg.com
4 stars 4 forks source link

Improve error when email is not correctly formated #228

Closed antho1404 closed 4 years ago

antho1404 commented 4 years ago

The error is not properly displayed when the email is invalid:

➜  js-sdk git:(feature/login-logout-backend) ./packages/cli/bin/run login
? Your email awdawdawd
? Your password [hidden]

/Users/nico/Development/MESG/js-sdk/packages/cli/node_modules/@firebase/auth/dist/auth.js:67
function jc(a,b,c){function d(g){g&&b.appendChild("string"===typeof g?a.createTextNode(g):g)}for(var e=2;e<c.length;e++){var f=c[e];!ma(f)||q(f)&&0<f.nodeType?d(f):x(kc(f)?Wa(f):f,d)}}function ic(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)}function kc(a){if(a&&"number"==typeof a.length){if(q(a))return"function"==typeof a.item||"string"==typeof a.item;if(n(a))return"function"==typeof a.item}return!1};function lc(a){l.setTimeout(function(){throw a;},0)}var mc;

[u [Error]: The email address is badly formatted.] {
  code: 'auth/invalid-email',
  message: 'The email address is badly formatted.',
  a: null
}
antho1404 commented 4 years ago

Issue migrated to liteflow-labs/liteflow-js#10