File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ type serializedCheckResultsByLevel struct {
88
88
type serializedCheckResults struct {
89
89
ByLevel []serializedCheckResultsByLevel
90
90
CurrentLevel serializedLevel
91
- NextLevel serializedLevel
91
+ NextLevel * serializedLevel
92
92
}
93
93
94
94
// newToolResult creates a CallToolResult for the passed object handling any json marshaling errors
@@ -455,6 +455,9 @@ var rootCmd = &cobra.Command{
455
455
if err != nil {
456
456
return nil , err
457
457
}
458
+ if service .Id == "" {
459
+ return nil , fmt .Errorf ("service with id %s not found" , req .Params .Arguments ["serviceId" ].(string ))
460
+ }
458
461
459
462
stats , err := service .GetServiceStats (client )
460
463
if err != nil {
@@ -466,10 +469,12 @@ var rootCmd = &cobra.Command{
466
469
Alias : stats .Rubric .Level .Alias ,
467
470
Index : stats .Rubric .Level .Index ,
468
471
},
469
- NextLevel : serializedLevel {
472
+ }
473
+ if stats .Rubric .CheckResults .NextLevel .Level .Alias != "" {
474
+ result .NextLevel = & serializedLevel {
470
475
Alias : stats .Rubric .CheckResults .NextLevel .Level .Alias ,
471
476
Index : stats .Rubric .CheckResults .NextLevel .Level .Index ,
472
- },
477
+ }
473
478
}
474
479
475
480
for _ , checkResultsByLevel := range stats .Rubric .CheckResults .ByLevel .Nodes {
You can’t perform that action at this time.
0 commit comments