Handel classify text error

.log('starting classify...')
//let classification = await client.classifyText({ document });

let classification : any;
const operation = new <any>((resolve, reject) => {
client.classifyText({ document }).then(
(onResolved) => {
(onRejected) => {
classification = await operation;
}catch (e) {
.log('classification error:::', e)
.log('classification done')
if(!!classification) processResult = .assign(storeMailObject, classification[0])
processResult = .assign(storeMailObject, { categories: [] })



I am a Back-End Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store