Angular 8 - learning error handling

Hello,

I’m working through the Angular tutorial(Angular site) more specifically, how to handle errors and I’m not quite sure how to use one particular code in the tutorial. I’m hoping someone can give me some clarity. if your looking at the code pleases zoom in on: “TODO: better job of transforming error for user consumption***”

I was able to figure out how display the error message in the console.log but i’m not not quite sure how to display the error message to the “user consumption”. I’m also assuming when they say “user Consumption” there talking about the visiting user?

Question:
review the comments = // TODO: better job of transforming error for user consumption
how do i display the error message to the visiting user and again I’m assuming that’s what the document is alluding too when they say “user consumption”?

site:Angular tutorial site - error handling
File name: src/app/hero.service.ts

private handleError<T> (operation = 'operation', result?: T) {
  return (error: any): Observable<T> => {

    // TODO: send the error to remote logging infrastructure
    console.error(error); // log to console instead

    // TODO: better job of transforming error for user consumption
    this.log(`${operation} failed: ${error.message}`);

    // Let the app keep running by returning an empty result.
    return of(result as T);
  };
}
/** Log a HeroService message with the MessageService */
  private log(message: string) {
    this.messageService.add(`HeroService: ${message}`);
  }