adding angular service for displaying errors