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"} PokemonsNotFound = CustomError{Message: "Pokemons not found", Code: 404, InternalCode: "POKEMONS_NOT_FOUND"} PokemonAlreadySaved = CustomError{Message: "Pokemon already saved", Code: 400, InternalCode: "POKEMON_ALREADY_SAVED"} )
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.