Skip to content

Commit

Permalink
ATO-814: Added lambda facade error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
kalpaitch committed Aug 7, 2024
1 parent 34e9c2f commit 5c4bcea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions express/src/services/self-service-services-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ export default class SelfServiceServicesService {

try {
const response = await this.cognito.login(email, password);

return {
cognitoSession: nonNull(response.Session),
cognitoId: nonNull(response.ChallengeParameters?.USER_ID_FOR_SRP),
codeSentTo: nonNull(response.ChallengeParameters?.CODE_DELIVERY_DESTINATION)
};
} catch (error) {
console.error(error as Error);
throw error;
}

return {
cognitoSession: nonNull(response.Session),
cognitoId: nonNull(response.ChallengeParameters?.USER_ID_FOR_SRP),
codeSentTo: nonNull(response.ChallengeParameters?.CODE_DELIVERY_DESTINATION)
};
}

async putUser(user: OnboardingTableItem, accessToken: string): Promise<void> {
Expand Down

0 comments on commit 5c4bcea

Please sign in to comment.