Map a failed endpoint call or mutation error to the onServer slot of a TanStack Form error map.
onServer
Wraps contractErrorMessage from @beignet/core/client, so non-contract errors get the fallback copy and catalog codes can be overridden per form:
contractErrorMessage
@beignet/core/client
formApi.setErrorMap( serverErrorMap(error, "Could not update profile.", { HANDLE_UNAVAILABLE: "That handle is already taken.", }),); Copy
formApi.setErrorMap( serverErrorMap(error, "Could not update profile.", { HANDLE_UNAVAILABLE: "That handle is already taken.", }),);
Optional
Map a failed endpoint call or mutation error to the
onServerslot of a TanStack Form error map.Wraps
contractErrorMessagefrom@beignet/core/client, so non-contract errors get the fallback copy and catalog codes can be overridden per form: