#[non_exhaustive]pub struct GraphqlErrorEntry {
pub message: String,
pub code: Option<String>,
pub path: Option<Vec<Value>>,
pub locations: Option<Vec<Value>>,
pub extensions: Option<Value>,
}Expand description
One entry from a GraphQL response’s errors array.
extensions.code is the API’s intended discriminator. It publishes four
codes as contract — ACTION_STATE_NOT_FOUND, ACTION_STATE_OUT_OF_RANGE,
BLOCK_RANGE_ERROR and RATE_LIMITED — and deliberately keeps the message
text minimal, so matching on the code is the supported way to branch.
Every field but message is optional, and code in particular must stay
optional: the server runs maskedErrors: { isDev: false }, so an
unexpected error arrives with a generic message and no extensions at all.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: String§code: Option<String>Shortcut for extensions.code, lifted during decoding. None for a
masked error.
path: Option<Vec<Value>>Response path to the field that failed, when the server reports one.
locations: Option<Vec<Value>>Query source locations, when the server reports them.
extensions: Option<Value>The whole extensions object, kept verbatim so callers can read fields
beyond code without waiting for an SDK release.