# SkippedError

The `SkippedError` exception is used to indicate that a check should be skipped and not evaluated. This is typically used for applicability detection - when a check is not relevant to the current component (e.g., Go-specific checks on a Java repository, or Kubernetes checks when no manifests are present).

This exception is automatically caught by the `Check` context manager, which:

* Sets the check status to `skipped`
* Drops any previously recorded assertions (both passed and failed)
* Suppresses the exception so it doesn't propagate

Skipped checks are not shown to end-user developers but are available in the SQL API for analysis and debugging purposes.

## Constructor

```python
SkippedError(message=None)
```

* **message** (str, optional): A message describing why the check was skipped

## Usage

The `SkippedError` is typically raised automatically by the `Check.skip()` method rather than being raised directly:

```python
# Recommended approach - use Check.skip()
with Check("go-version-check") as check:
    if not check.exists(".go"):
        check.skip("No Go files found in repository")
    
    # This code won't execute if skip() was called
    go_version = check.get_value(".go.version")
    check.assert_match(go_version, r"^1\.(19|20|21)$")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-lunar.earthly.dev/plugin-sdks/python-sdk/policy/skipped-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
