View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006432 | Taler | mechant backend | public | 2020-07-16 20:15 | 2024-01-12 14:04 |
Reporter | Florian Dold | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | tweak | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.8 | Fixed in Version | 0.8 | ||
Summary | 0006432: consider making API error responses more developer friendly | ||||
Description | Some 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! | ||||
Tags | No tags attached. | ||||
|
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. |
|
We now consistently return the 'hint' as a human-readable string of the 'code', and additionally provide 'detail' about the failure in more cases. |
|
Fix committed to master branch. |
merchant: master d354d119 2020-08-25 22:32 Details Diff |
fix 0006432 |
Affected Issues 0006432 |
|
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 |
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 | |
2024-01-12 14:04 | Christian Grothoff | Category | merchant backend API (C) => mechant backend |