| Previous | Next |
| STATEREPOSITORY_E_SERVICE_STOP_IN_PROGRESS | STATEREPOSITORY_ERROR_CACHE_CORRUPTED |
STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED
nested StateRepository transaction identifies a scoped API or runtime boundary rather than a general machine failure. A StateRepository operation tried to begin a transaction while the same logical connection or call path already owned one. The misspelling in the public constant name is part of the SDK symbol and should not be “corrected” when searching logs.
First returning layer
The declared return type and source header determine the relevant status namespace.
This is not the same as a busy or locked repository. Locking describes contention between operations; nesting describes transaction ownership inside one logical operation. Keep the numeric value, declared return type, and first returning operation together with STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED; the same integer can belong to a different status namespace in another API.
Evidence map
| Capture | Diagnostic value |
|---|---|
| Outer transaction start, inner call stack, connection/session identity, and package operation being committed. | Identifies the concrete object and operation associated with nested StateRepository transaction. |
| Thread or async continuation that carried transaction state across a helper boundary. | Separates argument or lifecycle state from a lower-layer provider failure. |
| Rollback/commit result of the outer transaction and the first statement issued by the nested path. | Creates a stable before-and-after comparison. |
| Windows build and package servicing event that invoked the repository. | Shows whether this condition is the first result or a translated summary. |
Preserve windows build and package servicing event that invoked the repository before reinstalling, rebooting, clearing state, or substituting another device or provider. A success observed only after such a change is useful comparison data, but it does not identify the original cause.
Change one condition at a time
- Execute the inner operation without an outer transaction on a disposable package state. Repeat the original supported operation so the check remains tied to the same API boundary.
- Replace the inner begin/commit pair with one savepoint only in code that owns the database contract. Keep unrelated inputs fixed so the changed result remains attributable to the tested variable.
- Serialize concurrent repository mutations and compare whether the same call stack still nests. Record the first returned status and any state transition observed.
Decision points
| Observed comparison | Next conclusion to test |
|---|---|
| The first control changes the result | Concentrate on the variable isolated by this check: Execute the inner operation without an outer transaction on a disposable package state. |
| The second comparison reproduces the same first status | Preserve lower-layer provider, driver, service, or runtime evidence before editing application data. The second controlled check was: Replace the inner begin/commit pair with one savepoint only in code that owns the database contract. |
| A different status appears after the bounded change | The operation moved to another boundary after the third controlled check. That check was: Serialize concurrent repository mutations and compare whether the same call stack still nests. Retain both results and interpret the replacement through its own API contract. |
Repair and regression test
Targeted correction. Flatten the transaction boundary so the top-level operation owns commit and rollback, or use a documented higher-level API that composes the package change atomically. Modify only the object, argument, policy, provider, or lifecycle state identified by the collected evidence.
Acceptance criterion. The complete package operation commits or rolls back as one unit, no inner begin is issued, and retries do not leave partial StateRepository state. Re-run the original operation that produced this condition under its original identity and supported configuration, then keep one negative control that still produces the expected neighboring outcome.
Technical references
References for STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED on the deployed platform version.
- Microsoft Open Specifications: HRESULT values — defines the status namespace used.
- Microsoft: HRESULT facility extraction — documents the API or lifecycle boundary behind this condition.
- SQLite: transactions — provides ABI, implementation, or protocol context.
- SQLite: savepoints — supports the portability and verification limits.
Looking for a different code? Search another status or error code.
