View Issue Details

IDProjectCategoryView StatusLast Update
0006432Talermerchant backend API (C)public2021-09-02 18:23
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006432: consider making API error responses more developer friendly
DescriptionSome endpoints of the merchant now seem to *only* return the numeric "code", which makes it really tedious for developers who want to integrate with the merchant (or even configure it!).

For example, if I mistype some endpoint name I get
  "code": 10
which is really unhelpful.

We already generate a header with the error codes, we should consider adding the alphanumeric name for the error as "non-normative" extra information.

By now (younger than Taler ;-) ), there is also an RFC that defines the format for the "application/problem+json" MIME type: Using this might be a bit too much, as all errors are required to have a canonical URL for the error type, such as "".

However, just adding the alphanumeric name for the error code to the error JSON would already go a long way!
TagsNo tags attached.


Christian Grothoff

2020-08-25 20:39

manager   ~0016769

Changed the API to create the 'hint' from the error code, and to use an optional string for "detail" where additional relevant information may be passed. Merchant change in Git 0acefc9..d354d11.

Christian Grothoff

2020-08-25 21:02

manager   ~0016772

We now consistently return the 'hint' as a human-readable string of the 'code', and additionally provide 'detail' about the failure in more cases.

Christian Grothoff

2021-09-02 18:23

manager   ~0018371

Fix committed to master branch.

Related Changesets

merchant: master d354d119

2020-08-25 22:32

Christian Grothoff

Details Diff
fix 0006432 Affected Issues
mod - src/backend/taler-merchant-httpd.c Diff File
mod - src/backend/taler-merchant-httpd_get-orders-ID.c Diff File
mod - src/backend/taler-merchant-httpd_get-tips-ID.c Diff File
mod - src/backend/taler-merchant-httpd_post-orders-ID-abort.c Diff File
mod - src/backend/taler-merchant-httpd_post-orders-ID-claim.c Diff File
mod - src/backend/taler-merchant-httpd_post-orders-ID-paid.c Diff File
mod - src/backend/taler-merchant-httpd_post-orders-ID-pay.c Diff File
mod - src/backend/taler-merchant-httpd_post-orders-ID-refund.c Diff File
mod - src/backend/taler-merchant-httpd_post-tips-ID-pickup.c Diff File
mod - src/backend/taler-merchant-httpd_private-delete-instances-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-delete-orders-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-delete-products-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-delete-reserves-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-orders-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-orders.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-products-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-products.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-reserves-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-reserves.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-tips-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-tips.c Diff File
mod - src/backend/taler-merchant-httpd_private-get-transfers.c Diff File
mod - src/backend/taler-merchant-httpd_private-patch-instances-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-patch-orders-ID-forget.c Diff File
mod - src/backend/taler-merchant-httpd_private-patch-products-ID.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-instances.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-orders.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-products-ID-lock.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-products.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-reserves.c Diff File
mod - src/backend/taler-merchant-httpd_private-post-transfers.c Diff File
mod - src/lib/merchant_api_merchant_get_order.c Diff File

Issue History

Date Modified Username Field Change
2020-07-16 20:15 Florian Dold New Issue
2020-07-16 20:15 Florian Dold Status new => assigned
2020-07-16 20:15 Florian Dold Assigned To => Christian Grothoff
2020-07-16 21:10 Christian Grothoff Severity minor => tweak
2020-07-16 21:10 Christian Grothoff Product Version => git (master)
2020-08-19 19:36 Christian Grothoff Target Version => 0.8.1
2020-08-25 20:39 Christian Grothoff Note Added: 0016769
2020-08-25 21:02 Christian Grothoff Status assigned => resolved
2020-08-25 21:02 Christian Grothoff Resolution open => fixed
2020-08-25 21:02 Christian Grothoff Fixed in Version => 0.8
2020-08-25 21:02 Christian Grothoff Note Added: 0016772
2020-08-25 21:02 Christian Grothoff Target Version 0.8.1 => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2021-09-02 18:22 Christian Grothoff Changeset attached => Taler-merchant master d354d119
2021-09-02 18:23 Christian Grothoff Note Added: 0018371