Skip to content

PayloadDecodeError

Class: warmhub.PayloadDecodeError

PayloadDecodeError(message: str, *, shape: str, field: str | None = None, wref: str | None = None)

A read’s data could not be decoded into the requested shape.

A sibling of WarmHubError, not a subclass, for the same reason the stream errors are: this is not a backend failure and it is not retryable. The server sent what it was asked for; the caller’s shape and the repository’s shape disagree. Retrying is guaranteed to fail again.

Carries the pieces needed to act without a debugger: which shape was requested, which field broke, and which record it came from.

message = message

Documentation is not yet available.

shape = shape

Name of the target the payload was being decoded into.

field = field

The offending data key, when it could be identified.

wref = wref

The record the payload came from, when the caller is decoding a read.