042-synthetic-wallet-errors.rst (1588B)
1 DD 42: Wallet Dev Experiments 2 ############################# 3 4 :Design status: Accepted 5 :Implementation status: Implemented 6 :DD shepherd: TBD 7 :Historical contributors: Florian Dold 8 :First published: 2023-03-28 9 :Last substantive change: 2023-04-21 10 :Implementation evidence: taler-typescript-core (2022-10-12) 11 :Normative references: ``developer/taler-wallet-developer.rst`` 12 13 Summary 14 ======= 15 16 This design document defines new ``taler://`` URIs to cause synthetic errors 17 or special states in the wallet that can then be rendered by the UI. 18 19 Motivation 20 ========== 21 22 UIs need to handle various (error-) states and responses of wallet-core. It's 23 not easy to cover all of these states and responses manually. Some of them are 24 hard to reach or simulate without an elaborate test setup. 25 26 Requirements 27 ============ 28 29 The implementation of synthetic errors should be as separate from production 30 code as possible, to avoid making the normal code paths unreadable. 31 32 33 Proposed Solution 34 ================= 35 36 Special taler:// URIs 37 --------------------- 38 39 * ``taler://dev-experiment/$STATE_ID`` 40 * ``taler://pay/...?dev-experiment=`` 41 42 Special http(s):// URIs 43 ----------------------- 44 45 * ``http(s)://*.dev-experiment.taler.net/`` 46 47 * URLs for this subdomain are handled specially by the 48 wallet's HTTP layer and return fixed / mocked responses 49 instead of making real requests. 50 51 52 List of experiments 53 ------------------- 54 55 56 57 Alternatives 58 ============ 59 60 Drawbacks 61 ========= 62 63 Discussion / Q&A 64 ================ 65 66 (This should be filled in with results from discussions on mailing lists / personal communication.)