errors advanced
Everything else the package exports, for when you go beyond its components and hooks, such as your own queries or cache updates. Most projects never need these.
Errors1
ServerMutationError | Error thrown by a feature mutation hook when the backend returns typed errors. @evolve-storefront/errors/error |
Other functions and constants3
mapServerErrors | Map a mutation's typed backend errors to display messages, by code — never from the server message.@evolve-storefront/errors/map |
toFormErrors | Turn a failed mutation into the two error props a form View takes. @evolve-storefront/errors/to-form-errors |
isServerMutationError | Type guard for a ServerMutationError in a mutation's onError.@evolve-storefront/errors/error |
Types6
FieldErrorMap | A { field: string[] } map — the shape ui's Form takes as errors.@evolve-storefront/errors/to-form-errors |
FormErrorState | @evolve-storefront/errors/to-form-errors |
FieldValidationIssue | Tier 1 — a single field-level validation issue (FieldValidationIssue).@evolve-storefront/errors/types |
MappedServerErrors | Mapped result: per-field messages + an optional form-level message. @evolve-storefront/errors/types |
ResolveErrorCode | A code -> localized message resolver. @evolve-storefront/errors/types |
TypedError | A permissive shape for one entry of a mutation's xxxErrors union, so any feature's hand-written error type fits without casting.@evolve-storefront/errors/types |
Not listed: 0 props and options types. They appear as the tables on the pages of what they type.

