@@ -557,6 +557,9 @@ func (c *MerakiClient) getDeviceClientApplications(dur time.Duration, clients []
557
557
func (c * MerakiClient ) getDeviceClients (dur time.Duration ) ([]* kt.JCHF , error ) {
558
558
networkDevs , err := c .getNetworkDevices ()
559
559
if err != nil {
560
+ if strings .Contains (err .Error (), "(status 400)" ) { // There are no valid network devices to worry about here.
561
+ return nil , nil
562
+ }
560
563
return nil , err
561
564
}
562
565
@@ -829,6 +832,9 @@ func (c *MerakiClient) getUplinks(dur time.Duration) ([]*kt.JCHF, error) {
829
832
for _ , org := range c .orgs {
830
833
err := getUplinkStatus ("" , org , & uplinks )
831
834
if err != nil {
835
+ if strings .Contains (err .Error (), "(status 400)" ) { // There are no valid uplinks to worry about here.
836
+ return nil , nil
837
+ }
832
838
return nil , err
833
839
}
834
840
}
@@ -1107,6 +1113,9 @@ func (c *MerakiClient) getVpnStatus(dur time.Duration) ([]*kt.JCHF, error) {
1107
1113
for _ , org := range c .orgs {
1108
1114
err := getVpnStatus ("" , org , & vpns )
1109
1115
if err != nil {
1116
+ if strings .Contains (err .Error (), "(status 400)" ) { // There are no valid vpns to worry about here.
1117
+ return nil , nil
1118
+ }
1110
1119
return nil , err
1111
1120
}
1112
1121
}
@@ -1275,6 +1284,9 @@ func (c *MerakiClient) getDeviceStatus(dur time.Duration) ([]*kt.JCHF, error) {
1275
1284
for _ , org := range c .orgs {
1276
1285
err := getDeviceStatus ("" , org , & devices )
1277
1286
if err != nil {
1287
+ if strings .Contains (err .Error (), "(status 400)" ) { // There are no valid devices to worry about here.
1288
+ return nil , nil
1289
+ }
1278
1290
return nil , err
1279
1291
}
1280
1292
}
0 commit comments