Edit: Read the part at the end of the question!
I get this error:
My service code:
import { Http, Response, Headers } from \
Don't catch and rethrow. Just handle the exception when you consume the service.
.map(response => response.json());
Or if you want to handle the exception in your service, and just return an error you can do the following
.map(response => response.json())
.catch(error => Observable.throw("Error in x service"));
You can see the documentation of Observable.throw and how it is used.
The error object you are getting is malformed. You can add some console logs to see what you are getting back. But it is causing issues.