You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/10/17 12:44:36 UTC

[GitHub] [druid] FrankChen021 commented on a change in pull request #11724: Return HTTP 404 instead of 400 for supervisor/task endpoints

FrankChen021 commented on a change in pull request #11724:
URL: https://github.com/apache/druid/pull/11724#discussion_r730409696



##########
File path: integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java
##########
@@ -136,6 +136,9 @@ public TaskStatusPlus getTaskStatus(String taskID)
       );
       return taskStatusResponse.getStatus();
     }
+    catch (ISE e) {

Review comment:
       ISE is specific exception thrown by `makeRequest` function when HTTP response status code is not 200. And when this exceptio occurs, its exception message contains the HTTP status code. Here we catch and re-throw the exception to simplify the exception handling to check the HTTP status code in the message. 

##########
File path: integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java
##########
@@ -136,6 +136,9 @@ public TaskStatusPlus getTaskStatus(String taskID)
       );
       return taskStatusResponse.getStatus();
     }
+    catch (ISE e) {

Review comment:
       `ISE` is a specific exception thrown by `makeRequest` function when HTTP response status code is not 200. And when this exceptio occurs, its exception message contains the HTTP status code. Here we catch and re-throw the exception to simplify the exception handling to check the HTTP status code in the message. 




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org