You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// InvalidCastError Create an instance of Invalid Cast Error with object types
func InvalidCastError(from, to interface{}) Error {
return NewWithHttpStatusCode(ApplicationError, fmt.Sprintf("Cannot convert the '%v' value to %s.", from, reflect.TypeOf(to).Name()), http.StatusBadRequest)
}
// NullReferenceError Create an instance of Null Reference Error with object name
func NullReferenceError(fieldName string) Error {
return NewWithHttpStatusCode(ApplicationError, fmt.Sprintf("%s is null!", fieldName), http.StatusBadRequest)