# OperationCanceledError Class

> OperationCanceledError class in the TX Sheet Control JavaScript API for the browser: Raised when a host cancels a mutation.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > OperationCanceledError Class
- **335 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/llms-full.txt

---

Raised when a host cancels a mutation; the shared transaction rolls it back atomically.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

ES module import: `import { OperationCanceledError } from '@txtextcontrol/tx-sheet-control';`.

### Constructor

```javascript
new OperationCanceledError()
```

This overload has no parameters.

Returns: `OperationCanceledError`.

### Members

#### Properties

| Property | Description |
|---|---|
| [code](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/code-property/llms-full.txt) | The code value of OperationCanceledError. |

### Examples

Pass the OperationCanceledError value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```javascript
function inspectOperationCanceledErrorCode(operationCanceledError) {
    const value = operationCanceledError['code'];
    console.log('OperationCanceledError.code', value);
}
```

### See Also

- [JavaScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [OperationCanceledError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/code-property/llms-full.txt): OperationCanceledError.code property in the TX Sheet Control JavaScript API for the browser, with its type "OPERATION_CANCELED" and a JavaScript example.

---

## Nearby

- **Previous:** [NamedRangeCollection.set Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/namedrangecollection/set-method/llms-full.txt)
- **Next:** [OperationCanceledError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/operationcancelederror/code-property/llms-full.txt)
