View Issue Details

IDProjectCategoryView StatusLast Update
0006432Talermerchant backendpublic2024-01-12 13:04
ReporterFlorian Dold Assigned ToChristian Grothoff 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
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: https://tools.ietf.org/html/rfc7807. Using this might be a bit too much, as all errors are required to have a canonical URL for the error type, such as "https://taler.net/errors#DEPOSIT_DENOMINATION_KEY_UNKNOWN".

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

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-08-25 18: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 19: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 16:23

manager   ~0018371

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2020-07-16 18:15Florian DoldNew Issue
2020-07-16 18:15Florian DoldStatusnew => assigned
2020-07-16 18:15Florian DoldAssigned To => Christian Grothoff
2020-07-16 19:10Christian GrothoffSeverityminor => tweak
2020-07-16 19:10Christian GrothoffProduct Version => git (master)
2020-08-19 17:36Christian GrothoffTarget Version => 0.8.1
2020-08-25 18:39Christian GrothoffNote Added: 0016769
2020-08-25 19:02Christian GrothoffStatusassigned => informing
2020-08-25 19:02Christian GrothoffResolutionopen => fixed
2020-08-25 19:02Christian GrothoffFixed in Version => 0.8
2020-08-25 19:02Christian GrothoffNote Added: 0016772
2020-08-25 19:02Christian GrothoffTarget Version0.8.1 => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2021-09-02 16:22Christian Grothoff
2021-09-02 16:23Christian GrothoffNote Added: 0018371
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend