> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/callables/methodprop/methodprop.has_errors.md).

# MethodProp.HAS\_ERRORS

The HAS\_ERRORS property is used to add a filter to include or exclude functions that revert with an error.

In solidity a smart contract a developer can define custom errors which are then called when an error is raised.

An example of such a contract would be as below:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Example {
    error myCustomError(uint256 requestedAmount,address caller);

    function collectAllowance(address caller,uint256 requestedAmount) public returns (bool success){
            //just revert to show how errors work
            revert myCustomError(requestedAmount,caller);
    }

}
```

An example of a query which would filter to include functions that use errors is&#x20;

```python
from glider import *
def query():
  props_included = [MethodProp.HAS_ERRORS]
  functions = Functions()\
      .with_all_properties(props_included)\
      .exec(5)

  return functions
```

## Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FDx2QrJINwqxTgxg34oQ9%2Fimage.png?alt=media&amp;token=c2dc98b9-c49a-4680-be82-86c572bfc823" alt=""><figcaption></figcaption></figure>
