Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

119118 error message encoding #271

Open
wants to merge 3 commits into
base: dev-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ export class OtpComponent implements OnInit {
this.logVerifyOtpError(err.error.params.errmsg);
this.telemetryService.interact(this.generateVerifyOtpErrorInteractEdata);
if (_.get(err, 'error.result.remainingAttempt') === 0) {
this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050);

let dynamicKey = Math.random().toString(36).substring(2, 15);
let messageValue = this.resourceService.messages.emsg.m0050;
let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`;
let encodedValue = btoa(final_value);
console.log("encodedValue", encodedValue);
this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050;

} else {
this.infoMessage = '';
this.otpForm.controls.otp.setValue('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,15 @@ export class VerifyAccountIdentifierComponent implements OnInit {
}
handleError(err) {
if (_.get(err, 'error.result.remainingAttempt') === 0) {

let dynamicKey = Math.random().toString(36).substring(2, 15);
let messageValue = this.resourceService.messages.emsg.m0050;
let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`;
let encodedValue = btoa(final_value);
console.log("verify account identifier encodedValue", encodedValue);

this.disableFormSubmit = true;
this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050);
this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050
} else {
const filterPipe = new InterpolatePipe();
const errorMessage =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,17 @@ export class OtpPopupComponent implements OnInit, OnDestroy {
},
(err) => {
if (_.get(err, 'error.result.remainingAttempt') === 0) {

let dynamicKey = Math.random().toString(36).substring(2, 15);
let messageValue = this.resourceService.messages.emsg.m0050;
let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`;
let encodedValue = btoa(final_value);
console.log("popup encodedValue", encodedValue);

if (this.redirectToLogin) {
this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050);
this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050
} else {
this.toasterService.error(this.resourceService.messages.emsg.m0050);
this.toasterService.error(encodedValue); // this.resourceService.messages.emsg.m0050
this.closeContactForm.emit('true');
}
} else {
Expand Down