package types
import "github.com/edgexfoundry/go-mod-core-contracts/clients/types"
Index ¶
- func NewErrServiceClient(statusCode int, body []byte) error
- type ErrNotFound
- type ErrResponseNil
- type ErrServiceClient
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.
Source Files ¶
- Version
- v0.1.149 (latest)
- Published
- Jan 19, 2021
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 5 days ago –
Tools for package owners.