xuang7 commented on code in PR #4177:
URL: https://github.com/apache/texera/pull/4177#discussion_r2726122200


##########
file-service/src/main/scala/org/apache/texera/service/resource/DatasetResource.scala:
##########
@@ -175,6 +176,47 @@ object DatasetResource {
     normalized
   }
 
+  /**
+    * Converts LakeFS ApiException to appropriate HTTP exception
+    */
+  private def handleLakeFSException(e: io.lakefs.clients.sdk.ApiException): 
Nothing = {
+    val rawBody = 
Option(e.getResponseBody).filter(_.nonEmpty).getOrElse(e.getMessage)
+
+    val message =
+      Try(new 
ObjectMapper().readTree(rawBody).get("message").asText()).getOrElse(rawBody)

Review Comment:
   Fixed. The updated handler no longer parse the response body, so this 
parsing line is removed.



##########
file-service/src/main/scala/org/apache/texera/service/resource/DatasetResource.scala:
##########
@@ -175,6 +176,47 @@ object DatasetResource {
     normalized
   }
 
+  /**
+    * Converts LakeFS ApiException to appropriate HTTP exception
+    */
+  private def handleLakeFSException(e: io.lakefs.clients.sdk.ApiException): 
Nothing = {
+    val rawBody = 
Option(e.getResponseBody).filter(_.nonEmpty).getOrElse(e.getMessage)
+
+    val message =
+      Try(new 
ObjectMapper().readTree(rawBody).get("message").asText()).getOrElse(rawBody)

Review Comment:
   Fixed. The updated handler no longer parse the response body, so this 
parsing line is removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to