In the method “handleError”, you are returning a string:
return throwError(
'Something bad happened; please try again later.');
So, when you subscribe, you’ll receive the string 'Something bad happened; please try again later.'
If you want the subscriber to receive the message, change your handleMessage return value:
return throwError(error);
CLICK HERE to find out more related problems solutions.