View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006632 | Taler | wallet (Android App) | public | 2020-10-29 00:54 | 2023-01-26 22:53 |
Reporter | Christian Grothoff | Assigned To | avalos | ||
Priority | high | Severity | tweak | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | i7 | OS | Debian GNU/Linux | OS Version | squeeze |
Product Version | git (master) | ||||
Target Version | 0.9.1 | Fixed in Version | 0.9.1 | ||
Summary | 0006632: taler-android.git uses non-symbolic constants for Taler error codes | ||||
Description | At least: merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: statusCode = NotFound merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: "code": 2000, merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: statusCode = NotFound merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: "code": 2909, merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: statusCode = NotFound merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt: "code": 2511, wallet/src/test/java/net/taler/wallet/backend/WalletResponseTest.kt: "code":7001, wallet/src/test/java/net/taler/wallet/backend/WalletResponseTest.kt: "httpStatusCode": 401, Please use the Kotlin enumeration from gana (integrate as submodule and into the build) and use symbolic constants. I'm trying to find dead constants and do some major renaming, which is both impossible if we have code that just contains numeric values. Also, there are HTTP status codes given as "401", there must be some reasonably canonical HTTP status code enum in Java/Kotlin. If it truly does not exist, please expand GANA to generate one (GANA already includes the HTTP status code registry). | ||||
Tags | No tags attached. | ||||
|
tg: are you on this? |
|
Ah, tg ist falsch. grote: are you on this? ;-) |
|
yes, so this explains why I didn't see this before :) |
|
Note that above constants are *only* used in tests that were written with past output from the merchant or wallet-core. I can add GANA here, but it adds very little value as these tests are just testing if the error structure gets parsed correctly. |
|
Well, I think eventually we will have some Gana ErrorCode that we need to test for outside of tests, and regardless, the only clean way to do this is to have a Java/Kotlin enum with the symbolic names. So even if there is little value today, it certainly does sound like the right thing (TM) for the future. |
|
Pretty much implemented in c725df9a528ff1bfe2f912c19c06eb4588fbbb62. Additional fix in 18f1ebe0401e61d7dfab2e759708c74b76d3f672. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-29 00:54 | Christian Grothoff | New Issue | |
2020-10-29 00:54 | Christian Grothoff | Status | new => assigned |
2020-10-29 00:54 | Christian Grothoff | Assigned To | => tg |
2020-10-29 00:54 | Christian Grothoff | Relationship added | child of 0006434 |
2020-11-06 09:09 | Christian Grothoff | Note Added: 0017109 | |
2020-11-10 13:37 | Christian Grothoff | Relationship deleted | child of 0006434 |
2020-11-11 20:21 | Christian Grothoff | Assigned To | tg => grote |
2020-11-11 20:21 | Christian Grothoff | Note Added: 0017123 | |
2020-11-11 20:22 | grote | Note Added: 0017124 | |
2020-11-11 20:52 | grote | Note Added: 0017125 | |
2020-11-11 21:12 | Christian Grothoff | Note Added: 0017126 | |
2023-01-17 19:11 | grote | Assigned To | grote => avalos |
2023-01-23 21:20 | avalos | Note Added: 0019700 | |
2023-01-23 21:29 | avalos | Status | assigned => resolved |
2023-01-23 21:29 | avalos | Resolution | open => fixed |
2023-01-23 21:29 | avalos | Fixed in Version | => git (master) |
2023-01-23 22:25 | Christian Grothoff | Target Version | => 0.9.1 |
2023-01-23 22:25 | Christian Grothoff | Fixed in Version | git (master) => 0.9.1 |
2023-01-26 22:53 | Christian Grothoff | Status | resolved => closed |