Make repo service handle its own errors

Create common function in repo service to make service calls and handle errors.
Add alert dialog for reporting errors.
Add mock failed request
Lint code