service: endpoint returns error when request returns error.

Related to #342.