const (
GenericError int = 1
DBError int = 2
GenericNotFoundError int = 3
InputNotValid int = 4
// configuration
ConfigurationNotReady int = 100
// mongo errors
DBDuplicateKey int = 11000
)
func ReplyWithError(w http.ResponseWriter, errorCode int)
func ReplyWithErrorMessage(w http.ResponseWriter, errorCode int, msg string)
type ErrorReply struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}