taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

wallet-error-handling.md (2034B)


      1 # Wallet Error Handling Notes
      2 
      3 * https://docs.taler.net/deployments/tops-stage-devtesting.html
      4 
      5 ## Current
      6 
      7 * prepareWithdrawExchange
      8   * "unknown provider" => "trying to connect"
      9   * effect on DB
     10     * new exchange (ephemeral) entry is created
     11       * retries happen even after restart (FIXME: this should not happen)
     12   * retries:
     13     * Limited retries trying to contact exchange
     14   * types of errors:
     15     * No network / no response
     16       * desired handling: Do transparent retries, allow user to "retry now" and "cancel"
     17     * transient protocol error (500 from exchange)
     18       * desired handling: Do transparent retries, allow user to "retry now" and "cancel"
     19       * we may want to show the last error for diagnostics
     20     * Permanent error (e.g. exchange version incompatible with wallet)
     21       * desired error handling: show error message, no "retry now",
     22         nothing should be left behind in the database
     23 
     24 ## Changes
     25 
     26 * prepareWithdrawExchange
     27   * progressId as new input (chosen by client / UI)
     28   * notifications keyed on progressId
     29     * "still waiting", nextRetry
     30     * "transient error", nextRetry
     31 * retryRequestNow(progressId)
     32 * cancelRequest(progressId)
     33 
     34 Two levels of error handling:
     35 * after 5 seconds: "slow network", no error shown
     36 * after 10 seconds: alert, "there's something wrong", next retry, "retry now" button
     37 
     38 ```
     39 export interface TransactionStateTransitionNotification {
     40   type: NotificationType.RequestProgress;
     41   operation: string;
     42   progressToken: string;
     43   error: TalerErrorDetail;
     44   nextRetryDelay: TalerProtocolDuration;
     45 }
     46 ```
     47 
     48 ## dev experiments
     49 
     50 * new dev experiment for blocking requests $N times before they go through
     51 
     52 
     53 
     54 ## More error handling notes
     55 
     56 * request
     57  * notifications
     58   * recoverable/transient error
     59   * network timeout
     60  * return values
     61   * error
     62    * non-recoverable error
     63    * user abort
     64   * success
     65 
     66 
     67 Phases:
     68 * requests starts
     69 * after 5s: show "it's taking longer than expected"
     70 * after 10s: "action might not be possible"
     71  * retry now (possible every 3s)
     72  * error details
     73  * cancel