[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Protocol](https://evolu.dev/docs/api-reference/common/local-first/Protocol) › ProtocolErrorCode

```ts
const ProtocolErrorCode: {
  NoError: 0;
  QuotaError: 3;
  SyncError: 4;
  WriteError: 2;
  WriteKeyError: 1;
};
```

Defined in: [packages/common/src/local-first/Protocol.ts:462](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L462)

The error code in the header of a Response.

A client reports a code it does not know as [ProtocolInvalidDataError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolInvalidDataError),
which carries no `OwnerId`, and that relay's round for the owner ends. Every
released client does this, so a relay can add a code under the same
[protocolVersion](https://evolu.dev/docs/api-reference/common/local-first/Protocol/variables/protocolVersion) only where that outcome is acceptable.

## Type Declaration

| Name                                                | Type | Default value | Description                                                                                                               | Defined in                                                                                                                                                                         |
| --------------------------------------------------- | ---- | ------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="property-noerror"></a> `NoError`             | `0`  | `0`           | -                                                                                                                         | [packages/common/src/local-first/Protocol.ts:463](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L463) |
| <a id="property-quotaerror"></a> `QuotaError`       | `3`  | `3`           | A code for [ProtocolQuotaError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolQuotaError).       | [packages/common/src/local-first/Protocol.ts:469](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L469) |
| <a id="property-syncerror"></a> `SyncError`         | `4`  | `4`           | A code for [ProtocolSyncError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolSyncError).         | [packages/common/src/local-first/Protocol.ts:471](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L471) |
| <a id="property-writeerror"></a> `WriteError`       | `2`  | `2`           | A code for [ProtocolWriteError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolWriteError).       | [packages/common/src/local-first/Protocol.ts:467](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L467) |
| <a id="property-writekeyerror"></a> `WriteKeyError` | `1`  | `1`           | A code for [ProtocolWriteKeyError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolWriteKeyError). | [packages/common/src/local-first/Protocol.ts:465](https://github.com/evoluhq/evolu/blob/113517df8a8da4e4eed41363077878e657b22fca/packages/common/src/local-first/Protocol.ts#L465) |