Skip to content

Commit

Permalink
Error Handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale authored Aug 9, 2023
1 parent 1de42f0 commit c19b081
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions donor-registry/src/app/forms/forms.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2431,19 +2431,16 @@ export class FormsComponent implements OnInit {

console.log(res)
}, (err) => {


if(err.code == "2" && err.preventThirdParty == "true")
{
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);

}else if(err.code == "2" && err['errors'].length ){
if (err.code == "2") {
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);
} else if (err.code == "3") {
if (err.preventThirdParty == "true") {
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);
this.toastMsg.error("Error", err.message);
}
console.log(err)

}
console.log(err);
});
} catch (e) {
console.log(e)
Expand Down Expand Up @@ -2588,14 +2585,15 @@ export class FormsComponent implements OnInit {
console.log(res)

}, (err) => {
if(err.code == "2" && err.preventThirdParty == "true")
{
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);
}else if(err.code == "2" && err['errors'].length ){
if (err.code == "2") {
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);
} else if (err.code == "3") {
if (err.preventThirdParty == "true") {
checkESignStatus = false;
this.toastMsg.error("Error", err.errors);
this.toastMsg.error("Error", err.message);
}
}
console.log(err)
});
} catch (e) {
Expand Down

0 comments on commit c19b081

Please sign in to comment.