Documentation ¶
Index ¶
- Constants
- type CustomError
- type ErrorNotifier
- type HTTPError
- func NewHTTPClientError(statusCode int, errorCode, errorMessage string, errorData interface{}, ...) *HTTPError
- func NewHTTPError(statusCode int, errorCode, errorMessage string, errorData interface{}, ...) *HTTPError
- func NewHTTPServerError(statusCode int, errorCode, errorMessage string, errorData interface{}, ...) *HTTPError
Constants ¶
View Source
const ( ErrorCode4XX = "4XX" ErrorCode5XX = "5XX" )
View Source
const ErrParse = "******************ERROR DURING MARSHAL OF FULL MESSAGE*******************"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomError ¶
type CustomError struct { ErrorData interface{} `json:"errorData"` ErrorMessage string `json:"errorMessage"` ErrorDescription interface{} `json:"errorDescription"` ErrorCode string `json:"errorCode"` Notify bool `json:"-"` OriginalError string `json:"error"` }
func NewCustomError ¶
func NewCustomError(errorCode, errorMessage string, errorData interface{}, errorDescription interface{}, notify bool, err error) *CustomError
func (*CustomError) Error ¶
func (e *CustomError) Error() string
func (*CustomError) GetErrorResponse ¶
func (e *CustomError) GetErrorResponse() ([]byte, error)
type ErrorNotifier ¶
type HTTPError ¶
type HTTPError struct { CustomError StatusCode int `json:"statusCode"` }
func NewHTTPClientError ¶
func NewHTTPError ¶
Click to show internal directories.
Click to hide internal directories.