dimas-b commented on code in PR #864:
URL: https://github.com/apache/polaris/pull/864#discussion_r1931074988


##########
quarkus/service/src/test/java/org/apache/polaris/service/quarkus/IcebergExceptionMapperTest.java:
##########
@@ -37,35 +38,40 @@
 class IcebergExceptionMapperTest {
 
   static Stream<Arguments> fileIOExceptionMapping() {
-    return Stream.of(
-        Arguments.of(new AzureException("Unknown"), 500),
-        Arguments.of(new AzureException("Forbidden"), 403),
-        Arguments.of(new AzureException("FORBIDDEN"), 403),
-        Arguments.of(new AzureException("Not Authorized"), 403),
-        Arguments.of(new AzureException("Access Denied"), 403),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(400), 
""), 400),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(401), 
""), 403),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(403), 
""), 403),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(404), 
""), 400),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(429), 
""), 429),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(504), 
""), 500),
-        Arguments.of(new HttpResponseException("", mockAzureResponse(302), 
""), 502),
-        Arguments.of(S3Exception.builder().message("Access denied").build(), 
403),
-        
Arguments.of(S3Exception.builder().message("").statusCode(400).build(), 400),
-        
Arguments.of(S3Exception.builder().message("").statusCode(401).build(), 403),
-        
Arguments.of(S3Exception.builder().message("").statusCode(403).build(), 403),
-        
Arguments.of(S3Exception.builder().message("").statusCode(404).build(), 400),
-        
Arguments.of(S3Exception.builder().message("").statusCode(429).build(), 429),
-        
Arguments.of(S3Exception.builder().message("").statusCode(504).build(), 500),
-        
Arguments.of(S3Exception.builder().message("").statusCode(302).build(), 502),
-        Arguments.of(new StorageException(1, "access denied"), 403),
-        Arguments.of(new StorageException(400, ""), 400),
-        Arguments.of(new StorageException(401, ""), 403),
-        Arguments.of(new StorageException(403, ""), 403),
-        Arguments.of(new StorageException(404, ""), 400),
-        Arguments.of(new StorageException(429, ""), 429),
-        Arguments.of(new StorageException(504, ""), 500),
-        Arguments.of(new StorageException(302, ""), 502));
+    Map<Integer, Integer> cloudCodeMappings =
+        Map.of(
+            // Map of HTTP code returned from a cloud provider to the HTTP 
code Polaris is expected
+            // to return
+            302, 422,

Review Comment:
   @collado-mike FYI



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