Copilot commented on code in PR #489:
URL: 
https://github.com/apache/skywalking-booster-ui/pull/489#discussion_r2262519418


##########
src/views/dashboard/panel/Tool.vue:
##########
@@ -174,7 +174,8 @@ limitations under the License. -->
   const selectorStore = useSelectorStore();
   const topologyStore = useTopologyStore();
   const appStore = useAppStoreWithOut();
-  const params = useRoute().params;
+  const route = useRoute();
+  const params = route?.params || {};

Review Comment:
   [nitpick] The optional chaining with fallback `route?.params || {}` suggests 
defensive programming against a potentially null route, but `useRoute()` 
typically never returns null in Vue Router. Consider removing the optional 
chaining unless there's a specific case where route could be null.
   ```suggestion
     const params = route.params;
   ```



##########
src/views/dashboard/related/event/Header.vue:
##########
@@ -118,21 +118,19 @@ limitations under the License. -->
     }
   }
 
-  async function getEndpoints(id?: string) {
-    const resp = await eventStore.getEndpoints(id);
+  async function getEndpoints() {
+    const resp = await eventStore.getEndpoints();
     if (!resp) {
       return;
     }
     if (resp.errors) {
-      ElMessage.error(resp.errors);
       return;
     }
     state.endpoint = eventStore.endpoints[0];
   }
-  async function getInstances(id?: string) {
-    const resp = await eventStore.getInstances(id);
+  async function getInstances() {
+    const resp = await eventStore.getInstances();
     if (resp.errors) {
-      ElMessage.error(resp.errors);
       return;

Review Comment:
   Error handling was removed from the getInstances function. When 
`resp.errors` exists, the function now silently returns instead of showing an 
error message to the user. This could make debugging more difficult.



##########
src/views/dashboard/related/event/Header.vue:
##########
@@ -118,21 +118,19 @@ limitations under the License. -->
     }
   }
 
-  async function getEndpoints(id?: string) {
-    const resp = await eventStore.getEndpoints(id);
+  async function getEndpoints() {
+    const resp = await eventStore.getEndpoints();
     if (!resp) {
       return;
     }
     if (resp.errors) {
-      ElMessage.error(resp.errors);
       return;

Review Comment:
   Error handling was removed from the getEndpoints function. When 
`resp.errors` exists, the function now silently returns instead of showing an 
error message to the user. This could make debugging more difficult.



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