Skip to content

Commit

Permalink
Handle empty spaces returned from KYC Summary (#133)
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Sundberg <[email protected]>
  • Loading branch information
seansund authored Nov 3, 2023
1 parent b35c000 commit 8234d21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/data-extraction/data-extraction.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ export class DataExtractionImpl extends DataExtractionCsv<WatsonBackends, Contex
.summarize(subject)
.then(text => text.replace(/^Output: */, ''))
.then(text => {
console.log(`KYC Summary for ${subject}: ${text}`)
const result = text.trim()

return text
console.log(`KYC Summary for ${subject}: ${result}`)

return result
})
.catch(err => {
console.log('Error getting kyc summary: ', {err})
Expand Down

0 comments on commit 8234d21

Please sign in to comment.