View Issue Details

IDProjectCategoryView StatusLast Update
0006432Talermerchant backend API (C)public2020-08-25 21:02
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status resolvedResolutionfixed 
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.

Activities

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.

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