nl_tokens: making sure that Error from a promise is an Error object
pl_tokens: function formatError ( error : mixed ) : <mask> { if ( typeof error === 'object' && error != null && error instanceof Error ) { return error ; } if ( typeof error === 'object' && error != null && error . message != null ) { return new Error ( error . message ) ; } return new Error ( JSON . stringify ( error ) ) ; }