- Error:
SerovalUnsupportedTypeError - Step:
parse - Fields:
value, the value seroval cannot serialize. Development builds name only its type in the message.
What it means
Seroval met a value it has no way to send. The whole call stops, and nothing is written.
Common causes
- A function, such as a callback in component props.
- A class instance with no plugin for it.
- A symbol that is not a well-known symbol such as
Symbol.iterator. - A promise or a stream passed to
serialize,crossSerializeortoJSON. These functions return at once, so they cannot wait for later values. - A
RegExpwhileFeature.RegExpis indisabledFeatures, or aBigInt64ArrayorBigUint64ArraywhileFeature.BigIntTypedArrayis. - An array with too many holes, or a typed array that is too long to send.
How to fix it
- Read the
valuefield to find the value. - Transform the value into supported types before you serialize it. The supported types table lists them.
- Send a promise or a stream with
serializeAsync,toJSONAsyncorcrossSerializeStream. - Send a function or another value that both sides share by key with
createReference. - Write a plugin for a class of your own.