> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# NotRunnable

`function` **NotRunnable.type**

<pre language="python">
  `def NotRunnable.type(
  *,
  fields: dict[str, field | type] = ...,
  traceback: None | bool = None
  ) -> error_type`
</pre>

Derive a new error type from this one.

The new type inherits every field of this type and adds `fields`.
Its instances are also instances of this type and of each of its
ancestors, for both `isinstance` and type annotations. The name comes
from the variable the type is first assigned to, so declare error types
at module top level.

`fields` maps each field name to a type, or to `field(type, default = ...)`
for an optional field, as `record()` does. `message`, `stacktrace` and
`cause` are reserved, and an inherited field cannot be redeclared.

`traceback` decides how an error of this type renders when it escapes
the task. `True` shows the traceback, as for a bug. `False` prints the
message alone as an `ERROR:` line and exits with code 1, as
`ctx.std.process.exit` does: use it for expected refusals. Unset, it is
inherited; the root `error` has `True`.

```starlark theme={null}
DeployError = error.type(fields = {"deployment": str, "attempt": field(int, default = 1)})
DeployTimeout = DeployError.type(fields = {"after_ms": int})
NotLoggedIn = error.type(traceback = False)
```

`property` **NotRunnable.cause**

<pre language="python">
  `NotRunnable.cause: None | error`
</pre>

The error that led to this one, or `None`.

`property` **NotRunnable.message**

<pre language="python">
  `NotRunnable.message: str`
</pre>

What went wrong, as given to the constructor. `str(e)` returns it too.

`property` **NotRunnable.stacktrace**

<pre language="python">
  `NotRunnable.stacktrace: list[error_frame]`
</pre>

Where the error was constructed, as a list of frames, outermost call first. For an error the runtime built from a failed operation, it is where that failure reached AXL, e.g. the `future.block()` call.

`property` **NotRunnable.target**

<pre language="python">
  `NotRunnable.target: str`
</pre>

The target, as it was asked for.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.