|
|
} else if errors.As(err, &typeErr) {
|
|
} else if errors.As(err, &typeErr) {
|
|
|
clientErr = fmt.Errorf("Invalid type for body param %s: expected %s, got %s", typeErr.Field, typeErr.Type.Kind().String(), typeErr.Value)
|
|
clientErr = fmt.Errorf("Invalid type for body param %s: expected %s, got %s", typeErr.Field, typeErr.Type.Kind().String(), typeErr.Value)
|
|
|
return apierrors.NewErrPassThroughToClient(clientErr, http.StatusBadRequest)
|
|
return apierrors.NewErrPassThroughToClient(clientErr, http.StatusBadRequest)
|