View Issue Details

IDProjectCategoryView StatusLast Update
0006632Talerwallet (Android App)public2023-01-26 21:53
ReporterChristian Grothoff Assigned Toavalos Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-11-06 08:09

manager   ~0017109

tg: are you on this?

Christian Grothoff

2020-11-11 19:21

manager   ~0017123

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

grote

2020-11-11 19:22

reporter   ~0017124

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

grote

2020-11-11 19:52

reporter   ~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 20: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 20:20

developer   ~0019700

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

Issue History

Date ModifiedUsernameFieldChange
2020-10-28 23:54Christian GrothoffNew Issue
2020-10-28 23:54Christian GrothoffStatusnew => assigned
2020-10-28 23:54Christian GrothoffAssigned To => tg
2020-10-28 23:54Christian GrothoffRelationship addedchild of 0006434
2020-11-06 08:09Christian GrothoffNote Added: 0017109
2020-11-10 12:37Christian GrothoffRelationship deletedchild of 0006434
2020-11-11 19:21Christian GrothoffAssigned Totg => grote
2020-11-11 19:21Christian GrothoffNote Added: 0017123
2020-11-11 19:22groteNote Added: 0017124
2020-11-11 19:52groteNote Added: 0017125
2020-11-11 20:12Christian GrothoffNote Added: 0017126
2023-01-17 18:11groteAssigned Togrote => avalos
2023-01-23 20:20avalosNote Added: 0019700
2023-01-23 20:29avalosStatusassigned => informing
2023-01-23 20:29avalosResolutionopen => fixed
2023-01-23 20:29avalosFixed in Version => git (master)
2023-01-23 21:25Christian GrothoffTarget Version => 0.9.1
2023-01-23 21:25Christian GrothoffFixed in Versiongit (master) => 0.9.1
2023-01-26 21:53Christian GrothoffStatusinforming => closed