Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrServiceClient ¶
NewErrServiceClient returns an instance of the error interface with ErrServiceClient as its implementation.
Types ¶
type ErrNotFound ¶
type ErrNotFound struct{}
ErrNotFound represents an error returned from a service indicating the item being asked for was not found.
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type ErrResponseNil ¶
type ErrResponseNil struct{}
ErrResponseNil represents an error returned from a service indicating the response was unexpectedly empty.
func (ErrResponseNil) Error ¶
func (e ErrResponseNil) Error() string
type ErrServiceClient ¶
type ErrServiceClient struct { StatusCode int // StatusCode contains the HTTP status code returned from the target service // contains filtered or unexported fields }
ErrServiceClient exposes the details of a service's response in a more granular manner. This is useful when service A calls service B and service A needs to make a decision with regard to how it should respond to its own caller based on the error thrown from service B.
func (ErrServiceClient) Error ¶
func (e ErrServiceClient) Error() string
Error fulfills the error interface and returns an error message assembled from the state of ErrServiceClient.