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