gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] 02/02: Sandbox API: error type.


From: gnunet
Subject: [taler-docs] 02/02: Sandbox API: error type.
Date: Thu, 08 Dec 2022 10:34:47 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository docs.

commit 988ce230c0b38995b72d006af89477b564fd92e2
Author: MS <ms@taler.net>
AuthorDate: Thu Dec 8 09:47:28 2022 +0100

    Sandbox API: error type.
---
 libeufin/api-sandbox.rst | 51 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst
index 29affda..0149d4d 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"
+   }
+
+

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]