Map a failed endpoint call or mutation error to a root-level form error.
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
form.setError( "root", rootFormError(error, "Could not update profile.", { HANDLE_UNAVAILABLE: "That handle is already taken.", }),); Copy
form.setError( "root", rootFormError(error, "Could not update profile.", { HANDLE_UNAVAILABLE: "That handle is already taken.", }),);
Optional
Map a failed endpoint call or mutation error to a root-level form error.
Wraps
contractErrorMessagefrom@beignet/core/client, so non-contract errors get the fallback copy and catalog codes can be overridden per form: