Error handling for http or database calls

Hi, is there any best practises, how to handle errors, espacially for http calls or database calls.
In case of http request i go*****).map((data)=>{
      do something
    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?