nl_tokens: Intercept the API promise response
pl_tokens: function interceptPromiseResponse ( hasIntercepted , promise , doneHookInfo ) { let { hook } = doneHookInfo ; return promise . then ( res => ( hasIntercepted ? doneHookInfo . resData : hook ( null , <mask> ) ) , err => { // check whether is intercepted to avoid repeated interception if ( hasIntercepted ) { let { resException , resData } = doneHookInfo ; if ( resException ) { throw resData ; } return resData ; } return hook ( err || /* istanbul ignore next */ 'err' ) ; } ) ; }