View Issue Details

IDProjectCategoryView StatusLast Update
0007103Talermerchant backend API (C)public2021-11-25 23:45
ReporterFlorian Dold Assigned ToFlorian Dold  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionno change required 
Product Versiongit (master) 
Target Version0.9Fixed in Version0.9 
Summary0007103: merchant should generate better error message if exchange signkey of a /deposit response is not found
DescriptionCurrently, if this happens, the merchant just logs a rather non-actionable SQL constraint violation.

We should explicitly check if the merchant knows the exchange signing key *before* we do the insert (with an otherwise potentially failing select clause).
TagsNo tags attached.

Activities

Christian Grothoff

2021-11-25 23:22

manager   ~0018548

I am very confused how this can happen.
exchange_api_deposit.c::handle_deposit_finished() explicitly checks that the signing key used by the exchange is known in the /keys response.
exchange_api_handle.c::keys_completed_cb() explicitly calls the merchant to tell it whenever it gets new /keys.
taler-merchant-httpd_exchanges::keys_mgmt_cb() explicitly stores every exchange signing key in the database when it is called.

So how _can_ we end up with that database constraint violation? Is there a good way to reproduce this?

Florian Dold

2021-11-25 23:30

manager   ~0018550

I think I reported this bug *before* I knew that there was a linker problem causing a weird API incompatibility.

Probably the SQL statement can't fail now. It only failed because the exchange signing public key was set to NULL due to the linker issue.

Christian Grothoff

2021-11-25 23:45

manager   ~0018553

Ok, then let's just close this. No point in adding insane error handling for well-logged invariants.

Issue History

Date Modified Username Field Change
2021-11-23 12:25 Florian Dold New Issue
2021-11-23 12:25 Florian Dold Status new => assigned
2021-11-23 12:25 Florian Dold Assigned To => Christian Grothoff
2021-11-25 23:22 Christian Grothoff Note Added: 0018548
2021-11-25 23:22 Christian Grothoff Assigned To Christian Grothoff => Florian Dold
2021-11-25 23:22 Christian Grothoff Status assigned => feedback
2021-11-25 23:30 Florian Dold Note Added: 0018550
2021-11-25 23:45 Christian Grothoff Note Added: 0018553
2021-11-25 23:45 Christian Grothoff Status feedback => resolved
2021-11-25 23:45 Christian Grothoff Resolution open => no change required
2021-11-25 23:45 Christian Grothoff Fixed in Version => 0.9
2021-11-25 23:45 Christian Grothoff Target Version 0.9.1 => 0.9