title: Is it good way to throw error from service in nestjs like it:
body: <pre><code>const movie = await this.movieService.getOne(movie_id);
  if(!movie){
    throw new Error(
      JSON.stringify({
        message:'some message',
        status:'http status'
     })
    );
  }
  const rating = await this.ratingRepository.find({where:{movie});
  return rating;
  </code></pre>
  <p>And after it use try catch in controller and throw HttpExeption.</p>
  <pre><code>async getAllByMovie(@Param('movie_id') movie_id:string):Promise&lt;Rating[]&gt;{
    try{
      const ratings = await this.ratingService.getAllRatingsByMovie(Number(movie_id));
      return ratings;
    }catch(err){
      const {message,status} = JSON.parse(err.message);
      throw new HttpExeption(message,status);
    }
  }
  </code></pre>
  <p>Is it good or not?</p>