Error handling for http or database calls


#1

Hi, is there any best practises, how to handle errors, espacially for http calls or database calls.
In case of http request i go

  this.http.post(*****).map((data)=>{
      do something
  }).catch(err=>{
    throw new Error("error message");  
  })

then in page, i subscribe to this method and in case of error, i display alert with err.message. Is it proper way of handling and propagating errors?