Check whether a value is a Sheetwrite error. It matches same-realm errors,
cross-realm errors, and serialized failure envelopes by shape: a string
name and message, a non-empty string code and operation, and a
JSON-safe context when present. The guard does not check code against a
list, so a code from a newer Sheetwrite still passes; handle unknown codes
in the default branch of a switch.