File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,28 @@ public async Task<IActionResult> Get(string? list = null)
52
52
return Ok ( result ) ;
53
53
}
54
54
55
- // otherwise, if listId is provided, return all properties of list
56
- CrdList l = await zK8sList . generic . ReadNamespacedAsync < CrdList > (
57
- Globals . service . kubeconfig . Namespace , list ) ;
55
+ CrdList l = null ;
56
+ try
57
+ {
58
+ // otherwise, if listId is provided, return all properties of list
59
+ l = await zK8sList . generic . ReadNamespacedAsync < CrdList > (
60
+ Globals . service . kubeconfig . Namespace , list ) ;
61
+ }
62
+ catch ( k8s . Autorest . HttpOperationException ex )
63
+ {
64
+ /*
65
+ Console.WriteLine("** one **");
66
+ Console.WriteLine("StatusCode: " + ex.Response.StatusCode);
67
+ Console.WriteLine(" Message: " + ex.Message);
68
+ Console.WriteLine(" Data: " + ex.InnerException.Data);
69
+ */
70
+
71
+ if ( ex . Response . StatusCode . Equals ( "Not Found" ) )
72
+ {
73
+ return StatusCode ( StatusCodes . Status404NotFound ) ;
74
+ }
75
+ }
76
+
58
77
59
78
return Ok ( l . Spec . list ) ;
60
79
}
You can’t perform that action at this time.
0 commit comments