kontenhumas-be/utils/response/error.response.go

20 lines
584 B
Go

package response
type BadRequestError struct {
Success bool `json:"success" example:"false"`
Code int `json:"code" example:"400"`
Message string `json:"message" example:"bad request"`
}
type UnauthorizedError struct {
Success bool `json:"success" example:"false"`
Code int `json:"code" example:"401"`
Message string `json:"message" example:"unauthorized access"`
}
type InternalServerError struct {
Success bool `json:"success" example:"false"`
Code int `json:"code" example:"500"`
Message string `json:"message" example:"internal server error"`
}