requestRegcodes() adds all the subscriptions found to the slice. In our case the GET request returns two subscriptions, one with an expired regcode, the second with the current, active one.
RequestProducts() then bails on any error returned. Of course there is a 401 returned for the expired regcode.
Two ways to fix this:
Filter expired regcodes in requestRegcodes()
Don't bail / return an error if at least one of the regcodes worked to return some products
Probably both should be implemented. If at least one of the regcodes worked there is no need to break the entire operation.
We currently cannot use SLES containers because of this issue. I'm going to fix this locally (probably by just ignoring the error in RequestProducts()).
requestRegcodes() adds all the subscriptions found to the slice. In our case the GET request returns two subscriptions, one with an expired regcode, the second with the current, active one. RequestProducts() then bails on any error returned. Of course there is a 401 returned for the expired regcode. Two ways to fix this:
Probably both should be implemented. If at least one of the regcodes worked there is no need to break the entire operation. We currently cannot use SLES containers because of this issue. I'm going to fix this locally (probably by just ignoring the error in RequestProducts()).