RequestNetwork / web-components

A collection of Web Components for quickly integrating Request Network into your app.
https://docs.request.network
1 stars 4 forks source link

Improve Request Creation Timeout behavior #38

Closed MantisClone closed 2 months ago

MantisClone commented 4 months ago

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:

  1. "Refresh and Keep Waiting" - This starts another polling session.
  2. "Return to Dashboard" - This sends them back to the Dashboard.
MantisClone commented 4 months ago

Relevant: We increased the timeout to 2 minutes in https://github.com/RequestNetwork/invoicing-template/pull/24