gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 06/10: Nexus HTTP status codes review.


From: gnunet
Subject: [libeufin] 06/10: Nexus HTTP status codes review.
Date: Sat, 07 Jan 2023 13:49:05 +0100

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

ms pushed a commit to branch master
in repository libeufin.

commit 7d2c532d9f67b20e76459ed2d80d03d59c810199
Author: MS <ms@taler.net>
AuthorDate: Sat Jan 7 13:37:04 2023 +0100

    Nexus HTTP status codes review.
    
    Supporting the "504 Gateway Timeout" response.
---
 nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
index 9c000331..ffaefd4f 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
@@ -46,8 +46,12 @@ private suspend inline fun HttpClient.postToBank(url: 
String, body: String): Str
         }
     } catch (e: ClientRequestException) {
         logger.error(e.message)
+        val returnStatus = if (e.response.status.value == 
HttpStatusCode.RequestTimeout.value)
+            HttpStatusCode.GatewayTimeout
+        else HttpStatusCode.BadGateway
+        
         throw NexusError(
-            HttpStatusCode.BadGateway,
+            returnStatus,
             e.message
         )
     }

-- 
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]