View Issue Details

IDProjectCategoryView StatusLast Update
0006632Talerwallet (Android App)public2020-11-11 21:12
ReporterChristian Grothoff Assigned Togrote  
PriorityhighSeveritytweakReproducibilityN/A
Status assignedResolutionopen 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.8.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.

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