Versions in this module Expand all Collapse all v0 v0.0.1 Mar 14, 2019 Changes in this version + const ErrorCodeBadRequest + const ErrorCodeDatabaseError + const ErrorCodeElasticSearchError + const ErrorCodeInvalidArgs + const ErrorCodeNotFound + const ErrorCodeNotImplemented + const ErrorCodePermissionDenied + const ErrorCodeResourceAlreadyExists + const ErrorCodeResourceNotFound + const ErrorCodeResourceStateConflict + const ErrorCodeUnauthorized + const ErrorCodeUnknownIssue + var ErrorMessageList = map[Code]StatusMessage + func AddError(code Code, message string, status int) + type AlaudaError struct + Code Code + Fields []map[string][]string + Message string + Source string + StatusCode int + func GetError(source string, err *AlaudaError, code Code) *AlaudaError + func New(source string, code Code) *AlaudaError + func NewCommon(source string, err error) *AlaudaError + func TreatError(source string, err error, code string) *AlaudaError + func (h *AlaudaError) AddFieldError(field string, message ...string) *AlaudaError + func (h *AlaudaError) AddFieldsFromError(format string, index int, err *AlaudaError) *AlaudaError + func (h *AlaudaError) Error() string + func (h *AlaudaError) SetCode(code Code) *AlaudaError + func (h *AlaudaError) SetCodeString(code string) *AlaudaError + func (h *AlaudaError) SetMessage(format string, args ...interface{}) *AlaudaError + func (h *AlaudaError) SetSource(source string) *AlaudaError + type Code string + type StatusMessage struct + Message string + StatusCode int + func NewErrorStatusMessage(message string, status int) StatusMessage