Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// When a response has a bad status, this limits the number of characters that are shown from the response Body
ApiErrorMaxCharacterLimit = 500
)
Functions ¶
func FormatErrorMessage ¶
Format errorMessage message using title and detail when Model implements rfc7807
Types ¶
type GenericOpenAPIError ¶
type GenericOpenAPIError struct { StatusCode int Body []byte ErrorMessage string Model interface{} }
GenericOpenAPIError Provides access to the Body, errorMessage and Model on returned Errors.
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an errorMessage.
func (GenericOpenAPIError) GetBody ¶
func (e GenericOpenAPIError) GetBody() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) GetModel ¶
func (e GenericOpenAPIError) GetModel() interface{}
Model returns the unpacked Model of the errorMessage
func (GenericOpenAPIError) GetStatusCode ¶
func (e GenericOpenAPIError) GetStatusCode() int
StatusCode returns the status code of the response
Click to show internal directories.
Click to hide internal directories.