summaryrefslogtreecommitdiff
path: root/libeufin
diff options
context:
space:
mode:
authorMS <ms@taler.net>2022-12-08 09:47:28 +0100
committerMS <ms@taler.net>2022-12-08 09:47:28 +0100
commit988ce230c0b38995b72d006af89477b564fd92e2 (patch)
treef4d254a62ef07ae99a3090849aaecbe87f43b4bd /libeufin
parentefbe1dddecbdbf25029381bedc32269ffeeb6eea (diff)
downloaddocs-988ce230c0b38995b72d006af89477b564fd92e2.tar.gz
docs-988ce230c0b38995b72d006af89477b564fd92e2.tar.bz2
docs-988ce230c0b38995b72d006af89477b564fd92e2.zip
Sandbox API: error type.
Diffstat (limited to 'libeufin')
-rw-r--r--libeufin/api-sandbox.rst51
1 files changed, 50 insertions, 1 deletions
diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst
index 29affda9..0149d4d6 100644
--- a/libeufin/api-sandbox.rst
+++ b/libeufin/api-sandbox.rst
@@ -68,7 +68,11 @@ The following endpoints are served under ``/demobanks/default/customer-api``.
One information was not available, the error message should inform
about it.
:http:statuscode:`403 Forbidden`:
- A istitutional username was attempted, like ``admin`` or ``bank``.
+ A istitutional username was attempted, like ``admin`` or ``bank``.
+ :http:statuscode:`404 Bad request`:
+ Input data was invalid. For example, the client specified a invalid
+ phone number or e-mail.
+
.. http:delete:: /customers
@@ -625,3 +629,48 @@ Transactions.
The last Camt.053 document related to the bank account
mentioned in the request body.
+
+
+======
+Errors
+======
+
+The JSON type coming along a non 2xx response is the following:
+
+.. ts:def:: SandboxError
+
+ interface SandboxError {
+ error: SandboxErrorDetail;
+ }
+
+.. ts:def:: SandboxErrorDetail
+
+ interface SandboxErrorDetail {
+
+ // String enum classifying the error.
+ type: ErrorType;
+
+ // Human-readable error description.
+ message: string;
+ }
+
+.. ts:def:: ErrorType
+
+ enum ErrorType {
+ /**
+ * This error can be related to a business operation,
+ * a non-existent object requested by the client, or
+ * even when the bank itself fails.
+ */
+ SandboxError = "sandbox-error",
+
+ /**
+ * It is the error type thrown by helper functions
+ * from the Util library. Those are used by both
+ * Sandbox and Nexus, therefore the actual meaning
+ * must be carried by the error 'message' field.
+ */
+ UtilError = "util-error"
+ }
+
+