SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then
[SOLVED]

payload cannot be encoded as JSON [SQL0097]

Edit this page
code SQL0097 · recovery permanent — an unchanged retry cannot succeed; retry machinery stops immediately
the log line · Report this thread
SQL0097 Permanent error

As it arrives in your log or error chain — the values are your call's own:

payload cannot be encoded as JSON -- give the payload a shape encoding/json accepts -- the cause names what it could not encode [SQL0097]

encoding/json rejected the message: a NaN or infinite float, a channel, func or complex field, a value that points back at itself, or a MarshalJSON that returned an error. Nothing was produced, and a schedule that hit it was not registered. Raised by Produce, ProduceInTx, the batch path, and Scheduler.Register.

The cause is encoding/json’s own error. It names the type or the field, never the value: SQLStreams encodes the payload in Go before handing it to the driver so that a failure never prints the document. The driver’s own encode error would.

ACCEPTED ANSWER Posted: 2026-09-09
brandon Site Admin brandon profile Posts: 677

give the payload a shape encoding/json accepts -- the cause names what it could not encode

Nothing pasted yet — the queries above show their blanks.

Looking for a different code? Search every thread.