Added status code in checking the getSamplingRules function. Added unit test for it.
Fixes #5717
Description
getSamplingRules method in the AWS X-Ray sampler did not check the HTTP response status code, potentially leading to incorrect handling of non-200 responses.
Added a check for the HTTP response status code in the getSamplingRules method.
If the status code is not 200, the method now returns an error instead of proceeding to unmarshal the response body.
Added status code in checking the getSamplingRules function. Added unit test for it.
Fixes #5717
Description
getSamplingRules
method in the AWS X-Ray sampler did not check the HTTP response status code, potentially leading to incorrect handling of non-200 responses.