xuang7 commented on code in PR #4177:
URL: https://github.com/apache/texera/pull/4177#discussion_r2726139588
##########
file-service/src/main/scala/org/apache/texera/service/resource/DatasetResource.scala:
##########
@@ -384,11 +428,13 @@ class DatasetResource {
}
// Create a commit in LakeFS
- val commit = LakeFSStorageClient.createCommit(
- repoName = repositoryName,
- branch = "main",
- commitMessage = s"Created dataset version: $newVersionName"
- )
+ val commit = withLakeFSErrorHandling {
+ LakeFSStorageClient.createCommit(
+ repoName = repositoryName,
+ branch = "main",
+ commitMessage = s"Created dataset version: $newVersionName"
+ )
+ }
Review Comment:
Thanks for the suggestion. I currently centralized the LakeFS exception→HTTP
mapping in the file-service (LakeFSExceptionHandler). The safeCall approach
also looks clean and would centralize handling at the storage layer near
LakeFSStorageClient. Would you recommend switching to
LakeFSStorageClient.safeCall(...) so all callers share the same handler?
--
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]