You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/02 16:44:13 UTC

[GitHub] [pinot] jayeshchoudhary commented on a diff in pull request #9700: WIP UI: show segment debug details when segment is in bad state

jayeshchoudhary commented on code in PR #9700:
URL: https://github.com/apache/pinot/pull/9700#discussion_r1012042900


##########
pinot-controller/src/main/resources/app/utils/axios-config.ts:
##########
@@ -65,4 +65,11 @@ baseApi.interceptors.response.use(handleResponse, handleError);
 
 export const transformApi = axios.create({baseURL: '/', transformResponse: [data => data]});
 transformApi.interceptors.request.use(handleConfig, handleError);
-transformApi.interceptors.response.use(handleResponse, handleError);
\ No newline at end of file
+transformApi.interceptors.response.use(handleResponse, handleError);
+
+// baseApi axios instance does not throw an error when API fails hence the control will never go to catch block
+// changing the handleError method of baseApi will cause current UI to break (as UI might have not handle error properly)
+// creating a new axios instance baseApiV1 which can be used when adding new API's
+export const baseApiV1 = axios.create({ baseURL: '/' });

Review Comment:
   ack
   Yes, it is not used in this PR but I faced this situation a lot of times where I wanted to notify the user that the API failed hence no data shown.



-- 
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@pinot.apache.org

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


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