package models type ApiErrorCustom struct { Success bool `json:"success"` Status int `json:"status"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` } func (e ApiErrorCustom) Error() string { return e.Message }