Transaction Error Messages Test Page

Click on any error scenario below to see how the error message is displayed to users.

Testing Instructions

  • Click any error card to trigger the error dialog
  • Test on both desktop and mobile viewports to see responsive behavior
  • Verify that Swedish messages are displayed correctly
  • Check that contextual information (tickets, amounts) is shown when available
  • For INSUFFICIENT_TICKETS, verify the available tickets count is displayed
  • For PARTIAL_ALLOCATION, verify allocated tickets and refund amount are mentioned
  • For REFUND_FAILED errors, verify contact information is provided

Backend API Documentation

These error messages correspond to the new structured error responses from the backend API:

  • POST /lotteries/[slug]/transactions - HTTP error codes
  • GET /lotteries/[slug]/transactions/[id] - Transaction state errors
  • All errors include structured error data with contextual information