Skip to content

Commit

Permalink
fix: [sc-24835] Issue when adding RP Fault via postman (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda committed May 1, 2024
1 parent b27bcb6 commit e3178ac
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ module.exports = class SetContextData {
}

async run (event, context) {
this.email = this.services.userInfo ? await this.services.userInfo.emailFromUserId(context.userId) : ''
try {
this.email = await this.services.userInfo.emailFromUserId(context.userId)
} catch (err) {
console.log(`Failed to get email from user ID: '${context.userId}'`)
this.email = ''
}

const FORM_DATA_STRING_LENGTH = 8
const config = {}
Expand Down

0 comments on commit e3178ac

Please sign in to comment.