Using RxJS Observables within Angular
this.myService.getEmp(personEmpId).subscribe(
result => {
this.personName = result.person_name;
},
error => {
console.log("EE:",error);
}
);
Is there a way to check if my subscription to this service returns a NULL result, indicating that no record was found?
I attempted to handle the error but it didn't trigger the console message.
Currently, I am encountering the following error:
ERROR TypeError: "result is null"