View Issue Details

IDProjectCategoryView StatusLast Update
0006632Talerwallet (Android App)public2023-01-26 22:53
ReporterChristian Grothoff Assigned Toavalos  
PriorityhighSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.9.1Fixed in Version0.9.1 
Summary0006632: taler-android.git uses non-symbolic constants for Taler error codes
DescriptionAt 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).
TagsNo tags attached.

Activities

Christian Grothoff

2020-11-06 09:09

manager   ~0017109

tg: are you on this?

Christian Grothoff

2020-11-11 20:21

manager   ~0017123

Ah, tg ist falsch. grote: are you on this? ;-)

grote

2020-11-11 20:22

developer   ~0017124

yes, so this explains why I didn't see this before :)

grote

2020-11-11 20:52

developer   ~0017125

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.

Christian Grothoff

2020-11-11 21:12

manager   ~0017126

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.

avalos

2023-01-23 21:20

developer   ~0019700

Pretty much implemented in c725df9a528ff1bfe2f912c19c06eb4588fbbb62.
Additional fix in 18f1ebe0401e61d7dfab2e759708c74b76d3f672.

Issue History

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