gavin9402 commented on code in PR #8179:
URL: https://github.com/apache/paimon/pull/8179#discussion_r3526129604


##########
paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java:
##########
@@ -910,6 +914,143 @@ public PagedList<Function> listFunctionDetailsPaged(
         }
     }
 
+    @Override
+    public List<String> listResources(String databaseName) throws 
DatabaseNotExistException {
+        try {
+            return api.listResources(databaseName);
+        } catch (NoSuchResourceException e) {
+            throw new DatabaseNotExistException(databaseName);
+        } catch (ForbiddenException e) {
+            throw new DatabaseNoPermissionException(databaseName, e);
+        }
+    }
+
+    @Override
+    public Resource getResource(Identifier identifier) throws 
ResourceNotExistException {
+        try {
+            GetResourceResponse response = api.getResource(identifier);
+            return toResource(identifier, response);
+        } catch (NoSuchResourceException e) {
+            throw new ResourceNotExistException(identifier, e);
+        } catch (ForbiddenException e) {
+            throw new TableNoPermissionException(identifier, e);
+        }
+    }
+
+    @Override
+    public void createResource(Identifier identifier, Resource resource, 
boolean ignoreIfExists)
+            throws ResourceAlreadyExistException, DatabaseNotExistException {
+        RESTFunctionValidator.checkFunctionName(identifier.getObjectName());
+        try {
+            api.createResource(
+                    identifier,
+                    resource.comment().orElse(null),
+                    resource.uri(),
+                    resource.resourceType());
+        } catch (NoSuchResourceException e) {

Review Comment:
   catch ForbiddenException fixed



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