> 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/error/error.source_code.md).

# Error.source\_code()

Returns the source code of the error.

`source_code() → str`

## Query Example

```python
from glider import *

def query():
  contracts = Contracts().exec(1, 2265)

  for contract in contracts:
    for error in contract.errors().exec():
      print(error.source_code())

  return []
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2F7e6hMxsyAVs4sRoPMhGZ%2FScreenshot%202025-07-29%20at%206.19.02%E2%80%AFPM.png?alt=media&amp;token=daa97294-7d17-4e7b-92a4-1b45f007dd7f" alt=""><figcaption></figcaption></figure>
