When creating an invoice times out, the user sees an error: "Something went wrong." and in the console they can see the actual error message indicating that it timed out.
Risk: the user might attempt to create a duplicate invoice.
Proposed solution
When a timeout occurs, display a message and two buttons:
Message: "Creating the invoice is taking longer than expected. You can refresh and keep waiting or return to the dashboard. Your invoice will be created eventually."
Buttons:
"Refresh and Keep Waiting" - This starts another polling session.
"Return to Dashboard" - This sends them back to the Dashboard.
Problem
When creating an invoice times out, the user sees an error: "Something went wrong." and in the console they can see the actual error message indicating that it timed out.
Risk: the user might attempt to create a duplicate invoice.
Proposed solution
When a timeout occurs, display a message and two buttons:
Message: "Creating the invoice is taking longer than expected. You can refresh and keep waiting or return to the dashboard. Your invoice will be created eventually."
Buttons: