Skip to content

Commit fc2a03a

Browse files
committed
fix: GetMetricsList err handle
1 parent 85018ac commit fc2a03a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/console/handler/observability.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ func GetMetricsList(ctx consolectx.Context) gin.HandlerFunc {
100100
return func(c *gin.Context) {
101101
req := &model.MetricsReq{}
102102
if err := c.ShouldBindQuery(req); err != nil {
103+
c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error()))
104+
return
103105
}
104106
resp, err := service.GetInstanceMetrics(ctx, req)
105107
if err != nil {

0 commit comments

Comments
 (0)