API reference > @kontsedal/olas-core > MutationDisposedError
MutationDisposedError class
Rejection from mutation.run(...) when the mutation was already disposed — the owning controller is gone, so mutate was never called and **the write did not happen**.
Deliberately NOT an AbortError. Every other cancellation in this library is one, and isAbortError(err) is the documented way to filter them — which is exactly why an abort is the wrong shape here. A superseded or reset run is work the app *chose* to drop; a run against a disposed mutation is work the app asked for and silently did not get, and a blanket abort filter would hide that lost write.
Reaching this usually means a callback outlived its controller — a confirm dialog answered after the panel behind it closed, a retry button in a toast that outlives the view. Two fixes, in order of preference:
- Own the mutation somewhere that lives as long as the interaction does. 2.
createMutation(ctx, { detached: true })— runs then survive dispose, and this error is never thrown. SPEC §6.5.
Signature:
declare class MutationDisposedError extends ErrorExtends: Error
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| readonly string[] | Path of the controller that owned the mutation. | |
| string | undefined | The mutation's |