Fokko commented on code in PR #8914:
URL: https://github.com/apache/iceberg/pull/8914#discussion_r1371690577


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2322,13 +2322,22 @@ components:
           description: Authorization scope for client credentials or token 
exchange
 
     IcebergErrorResponse:
+      description: JSON wrapper for all error responses (non-2xx)
       type: object
       required:
         - error
       properties:
         error:
           $ref: '#/components/schemas/ErrorModel'
       additionalProperties: false
+      example:
+        {
+          "error": {
+            "message": "The server does not support this operation",
+            "type": "UnsupportedOperationException",
+            "code": 406
+          }
+        }

Review Comment:
   👍 
   
   This is in line with the PyIceberg implementation:
   
   ```python
   class ErrorResponseMessage(IcebergBaseModel):
       message: str = Field()
       type: str = Field()
       code: int = Field()
   
   
   class ErrorResponse(IcebergBaseModel):
       error: ErrorResponseMessage = Field()
   
   ```



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2322,13 +2322,22 @@ components:
           description: Authorization scope for client credentials or token 
exchange
 
     IcebergErrorResponse:
+      description: JSON wrapper for all error responses (non-2xx)
       type: object
       required:
         - error
       properties:
         error:
           $ref: '#/components/schemas/ErrorModel'
       additionalProperties: false
+      example:
+        {
+          "error": {
+            "message": "The server does not support this operation",
+            "type": "UnsupportedOperationException",
+            "code": 406
+          }
+        }

Review Comment:
   👍 
   
   This is in line with the PyIceberg implementation:
   
   ```python
   class ErrorResponseMessage(IcebergBaseModel):
       message: str = Field()
       type: str = Field()
       code: int = Field()
   
   
   class ErrorResponse(IcebergBaseModel):
       error: ErrorResponseMessage = Field()
   
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to