// InvalidValueErrorf is used when the type isn't meaningful--just the contents and the
// context matter.
349319
func InvalidValueErrorf(val interface{}, msgFormat string, args ...interface{}) error {
	if verboseErrors {
		return pretty.Errorf("%s\n(%# v)", pretty.Sprintf(msgFormat, args...), val)
	}

	return pretty.Errorf("(%s) value: %s", reflect.TypeOf(val), pretty.Sprintf(msgFormat, args...))
}
1374798
func Errorf(status int, format string, v ...interface{}) (int, *ErrorResponse) {
	return Error(status, fmt.Sprintf(format, v...))
}
530141
func errorf(status int, format string, a ...interface{}) *protocolError {
	return withStatus(fmt.Errorf(format, a...), status)
}
1207649
func InvalidLengthError(ctx string, target interface{}, ln, value int, min bool) error {
	comp := "greater than or equal to"
	if !min {
		comp = "less than or equal to"
	}
	msg := fmt.Sprintf("length of %s must be %s %d but got value %#v (len=%d)", ctx, comp, value, target, ln)
	return ErrInvalidRequest(msg, "attribute", ctx, "value", target, "len", ln, "comp", comp, "expected", value)
}
970282
func (lx *lexer) errorf(format string, values ...interface{}) stateFn {
	for i, value := range values {
		if v, ok := value.(rune); ok {
			values[i] = escapeSpecial(v)
		}
	}

	// Position of error in current line.
	pos := lx.pos - lx.lstart
	lx.items <- item{
		itemError,
		fmt.Sprintf(format, values...),
		lx.line,
		pos,
	}
	return nil
}
757979
func (err *InvalidCharacterError) Error() string {
	return fmt.Sprintf("invalid character '%c' at position %d (%d)", err.r, err.pos, err.n)
}
1010975
func InvalidArgError(expected string, actual interface{}) {
	ReportError("cannot use %#v (type %s) as type %s",
		actual, reflect.TypeOf(actual), expected)
}
1028116
func Errorf(format string, a ...interface{}) Error {
	return WrapSkipping(fmt.Errorf(format, a...), 1)
}
390884
func (err InvalidConfigValueError) Error() string {
	return fmt.Sprintf("invalid config value (%s) for %q: %v", err.Value, err.Key, &err.Err)
}
213995
func Errorf(c codes.Code, format string, a ...interface{}) error {
	return &Status{Code: c, Message: fmt.Sprintf(format, a...)}
}
144970
func Errorf(
	nestedError NestedError,
	message string,
	args ...interface{},
) error {
	return Error{
		Message: fmt.Sprintf(message, args...),
		Nested:  nestedError,
	}
}
1116157
func (r *response) errorValue() Value {
	errdata := []byte(r.err.Error())
	return Value(errdata)
}
439448
func EmptyParamError(in string, f reflect.StructField) error {
	return fmt.Errorf("%s: %s value is required", f.Name, in)
}
655583
func InvalidContentType(w http.ResponseWriter, r *http.Request) {
	http.Error(w, "Invalid content type:"+r.Header.Get("Content-Type"), http.StatusBadRequest)
}
284952
func InvalidInstanceContextErrorf(baseError error, obj interface{}, msgFormat string, args ...interface{}) *ErrorWithContext {
	return ContextualizeErrorf(baseError, InvalidInstanceErrorf(obj, msgFormat, args...).Error())
}
914860
func InvalidContentType(detail string, a ...interface{}) *ProblemDetails {
	return &ProblemDetails{
		Type:       MalformedProblem,
		Detail:     fmt.Sprintf(detail, a...),
		HTTPStatus: http.StatusUnsupportedMediaType,
	}
}
44157
func Invalid(field *Path, value interface{}, detail string) *Error {
	return &Error{ErrorTypeInvalid, field.String(), value, detail}
}