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

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 140+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# E2405

> Google PubSub target — Canonical codec cannot encode this value

The canonical codec met a value outside the protocol: an unsafe integer, `NaN`/`±Infinity`, a
`Map`/`Set`/`RegExp`/class instance, a function or symbol, an `undefined` inside an array, or an
invalid `Date`. The message names the exact path (`$.swap.amounts[1]`).

The codec is deliberately total rather than lenient: "same operation ⇒ same bytes" is a protocol
guarantee, and a silent coercion (an unsafe integer rounding, an `undefined` becoming `null`) would
break it invisibly.

**Fix** — pass a `bigint` or a string for large integers, a number for sub-second timestamps, and a
plain object/array for structures. A route-level `encode` receives the complete CDC row.


## Related topics

- [E2405](/en/sdk/pipes-sdk/errors/E2405.md)
- [Error reference](/en/sdk/pipes-sdk/errors.md)
