Skip to content

Commit

Permalink
SendOTP: logging user's phone number event as message
Browse files Browse the repository at this point in the history
  • Loading branch information
choxx committed Jul 20, 2023
1 parent 4373db3 commit 570d2c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/api.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { RefreshRequest } from '@fusionauth/typescript-client/build/src/FusionAu
import { ChangePasswordDTO } from '../user/dto/changePassword.dto';
import { LoginDto } from '../user/dto/login.dto';
import { SentryInterceptor } from '../interceptors/sentry.interceptor';
import * as Sentry from '@sentry/node';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CryptoJS = require('crypto-js');

Expand Down Expand Up @@ -62,6 +63,12 @@ export class ApiController {
null,
);
if (!total || total == 0) {
Sentry.captureMessage('Phone number not registered', {
user: {
phone: phone,
applicationId: applicationId
}
});
throw new UnprocessableEntityException(errorMessage);
}
}
Expand Down

0 comments on commit 570d2c6

Please sign in to comment.