Skip to content

AdminActionResult

AdminActionResult = { success: string; } | { error: string; } | { fieldErrors: Record<string, string>; }

Defined in: packages/admin/src/types.ts:555

Discriminated union returned by the admin action handler.

The admin component uses this to display success messages, error banners, or per-field validation errors on forms.

  • { success: string } — operation completed; display a success toast
  • { error: string } — operation failed; display an error message
  • { fieldErrors: Record<string, string> } — validation failed; highlight individual fields