---
schema_version: "1"
id: 3aafb80078b1b37ab183f7e073f029cd2bea921c8ca6aebed673a6155b23aa88
title: DataWeave Issues and Errors
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-code-builder/troubleshoot-dataweave.md
canonical_url: https://docs.mulesoft.com/anypoint-code-builder/troubleshoot-dataweave
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8e03750181cf80364f90d419d81a124bd15e217450c487456dbcbf4bda133645
description: MuleSoft Documentation Site
latest: true
---
---
product: Anypoint Code Builder
version: master
---

# DataWeave Issues and Errors

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

When Anypoint Code Builder can’t process a value, it provides a visual indicator to identify an
issue with the value. Issues include:

- [Unable to find sample input](#sample-input)

- [Unable to resolve reference](#resolve-reference)

- [Expects _x_ but got _y_](#expects-y)

- [Invalid input](#invalid-input)

## Unable to Find Sample Input

The DataWeave error `Unable to find sample input` applies to a Mule event variable, such as
`payload`. In this case, Anypoint Code Builder places a wavy blue line under the value in the
configuration XML file.

!['Unable to find sample input' error](/mulesoft/current/en-us/anypoint-code-builder/_images/dw-issue-sample-data.png)

If your application isn’t running, Anypoint Code Builder can’t provide any information about Mule
variables unless you provide sample data. Use [Quick Fix](https://docs.mulesoft.com/anypoint-code-builder/int-configure-dw-expressions#sample-data)
to provide sample data in the format and data structure that you expect to be present when the
application runs.

For more information about Mule event variables, see
[Predefined Variables](https://docs.mulesoft.com/dataweave/latest/dataweave-variables-context).

## Unable to Resolve Reference

The error `Unable to resolve reference` is typically for a sequence of characters like `afkdldjf`
that isn’t recognized.

![\`Unable to resolve reference\` error](/mulesoft/current/en-us/anypoint-code-builder/_images/dw-issue-reference-resolution.png)

Either provide the intended value or use [Quick Fix](https://docs.mulesoft.com/anypoint-code-builder/int-configure-dw-expressions#sample-data) to
convert the character sequence into a DataWeave variable. For more information, see
[DataWeave Variables](https://docs.mulesoft.com/dataweave/latest/dataweave-variables).

## Expects _x_ but Got _y_

The error similar to `Expects _x_ but got _y_` typically indicates that something is wrong with the
provided function. For example, `Expects 1 argument but got 0` occurs for `round()` because the
function is missing an argument, in this case, a number to round. An example of a fix is
`round(1.65)`. Similar errors indicate that an argument is of the wrong data type or that a function
is otherwise malformed and requires correction.

Read the error message to determine what part of the expression to fix, and review the function
description after the error message to learn more about the function. See
[DataWeave Modules](https://docs.mulesoft.com/dataweave/latest/dw-functions#dw_modules) to find additional DataWeave
function documentation.

## Invalid Input

The error `Invalid input` typically occurs when special characters, such as `?`, appear in a
DataWeave expression and aren’t escaped, for example:

!['Invalid input' error](/mulesoft/current/en-us/anypoint-code-builder/_images/dw-issue-invalid-input.png)

For more information, see
[Rules for Declaring Valid Identifiers](https://docs.mulesoft.com/dataweave/latest/dataweave-language-introduction#valid-identifiers)
and
[Escape Special Characters](https://docs.mulesoft.com/dataweave/latest/dataweave-language-introduction#escape-special-characters).

## See Also

- [Known Issues](https://help.salesforce.com/s/issues)
