Angular 2: custom error message from the server

9 views
Skip to first unread message

Eric Blankenburg

unread,
Sep 24, 2016, 3:53:22 PM9/24/16
to AngularJS

How do I get a custom error message from the server?

        this.subscriberService
            .listSubscriberTypes()
            .subscribe(subscriberTypes => this.subscriberTypes = subscriberTypes, 
                        error => this.handleError(error));

error is just a string that describes the http error.

I want something more descriptive for the user.


Reply all
Reply to author
Forward
0 new messages