Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BadRequest = CustomError{Message: "BadRequest", Code: 400, InternalCode: "BADREQUEST"} NotFound = CustomError{Message: "NotFound", Code: 404, InternalCode: "NOT_FOUND"} InternalError = CustomError{Message: "Error", Code: 500, InternalCode: "INTERNAL_SERVER_ERROR"} CurrencyInvalidCharacter = CustomError{Message: "Currency it's contains 3 characters almost", Code: 400, InternalCode: "CURRENCY_CHAR_ERROR"} CurrencyInvalidName = CustomError{Message: "Currency error name", Code: 400, InternalCode: "CURRENCY_INVALID_ERROR"} TimeoutErrorApi = CustomError{Message: "Timeout on the call of the api", Code: 504, InternalCode: "TIMEOUT_API"} )
Functions ¶
This section is empty.
Types ¶
type CustomError ¶
type CustomError struct {
Message string `json:"message"`
Code int `json:"code"`
InternalCode string `json:"internalCode"`
}
CustomError custom error
func (CustomError) Error ¶
func (e CustomError) Error() string
func (CustomError) SetMessage ¶
func (e CustomError) SetMessage(msg string) CustomError
Click to show internal directories.
Click to hide internal directories.