Unidy Docs

Custom Error Messages & Toasts

Override every user-visible error and success message the SDK produces. Ships with three curated copy presets.

The Unidy SDK produces user-visible strings for every error and success event — sign-in failure, newsletter subscription, profile save, and so on. The plugin ships a Messages system that catches those strings and swaps them for your own copy. Configure under Unidy → Auth → Fehlermeldungen & Bestätigungen.

Presets

A preset is a curated copy set for the roughly 30 messages the SDK can produce. Three ship out of the box:

  • Casual DE (default) — Du-Ansprache, terse, friendly.
  • Formal DE — Sie-Ansprache, full sentences, admin-portal tone.
  • English — US-English mirror of Casual.
  • Custom — your own overrides only; no preset applied.

Click a preset card to activate it. Descriptions on each card summarize the tone.

Per-code overrides

Below the preset picker, every registered code is listed with its level (error / success / info / warning) and an editable input. The placeholder shows what the active preset would display if you leave the field empty.

Type your own copy to override a single message without switching the whole preset. Overrides win against presets; the resolved order is:

  1. Admin override (typed by you)
  2. Active preset
  3. Plugin-registered default
  4. Raw code (only as a fallback)

Codes are grouped by module (Auth, Newsletter, Profile, Tickets) so you can spot which module owns which message.

Message levels

Each code has a level that drives its visual style (color, icon):

  • Error — red tint. Something failed, visitor action required.
  • Success — green tint. An action completed successfully.
  • Info — blue tint. Neutral confirmation (e.g. "code sent to your email").
  • Warning — orange tint. Something worked but with caveats.

You cannot change a code's level from the admin — it's a plugin-side decision that reflects the message's meaning.

Message aliases

Some SDK flows emit pre-translated prose instead of machine codes. For example, the SDK might send "Sie haben sich erfolgreich abonniert" directly, not the code newsletter_subscribed. The plugin registers aliases — text-to-code mappings — for the most common SDK strings so your overrides catch both variants.

Additional aliases can be registered from a companion mu-plugin via the unidy_sdk_message_aliases filter.

Reset

At the top of the override list, a Alle zurücksetzen button appears when you have one or more overrides. Clicking it clears every override in one action — the active preset (or plugin default) takes over again.

Applying changes and legacy aliases

Save your settings and reload a representative page to verify error, success, info, and warning messages. Current releases supply configured SDK translations when components initialize. They do not rely on watching and replacing arbitrary toast DOM text after rendering.

The unidy_sdk_message_aliases filter remains a legacy text-to-code extension point for companion plugins. It is not the current mechanism for overriding SDK-rendered copy. Use the admin code editor for catalogued messages; ask your Unidy contact to map new SDK codes when needed.

Message-code examples

The editor groups the installed catalog by module. The legacy catalog below is useful when locating a message or reporting an untranslated code; the installed release and active locale determine the actual resolved wording.

ModuleCodeLevel and meaning
Authinvalid_emailError: invalid email
Authemail_not_foundError: account not found
Authemail_already_takenError: email already registered
Authinvalid_passwordError: incorrect password
Authpassword_too_shortError: password too short
Authinvalid_verification_codeError: incorrect verification code
Authexpired_verification_codeError: verification code expired
Authexpired_magic_codeError: sign-in code expired
Authrate_limitedError: too many requests
Authnetwork_errorError: connection failed
AuthunauthorizedError: authentication required
Authtoken_expiredError: session expired
Authoauth_provider_errorError: provider sign-in failed
Authunknown_errorError: unclassified failure
Authmissing_required_fieldError: required profile data missing
Authconsent_requiredError: required consent missing
Authsignin_successSuccess: signed in
Authsignup_successSuccess: registration completed
Authlogout_successSuccess: signed out
Authpassword_reset_sentInfo: password-reset link sent
Authmagic_code_sentInfo: sign-in code sent
Newsletternewsletter_subscribedSuccess: subscribed
Newsletternewsletter_unsubscribedSuccess: unsubscribed
Newsletternewsletter_preferences_updatedSuccess: preferences saved
Newsletternewsletter_doi_sentInfo: confirmation link sent
Newsletternewsletter_confirmedSuccess: subscription confirmed
Newsletternewsletter_already_subscribedInfo: already subscribed
Profileprofile_savedSuccess: profile saved
Profileprofile_save_failedError: profile save failed
Ticketsticket_download_failedError: ticket download failed
Ticketswallet_export_failedError: wallet export failed

The admin message code missing_required_field is singular. The SDK translation key errors.missing_required_fields is a separate identifier. Use the admin code when locating its override; the plugin maps it to the SDK's translated field error.

Was this page helpful?