-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
2
-
Severity 3 - Minor
-
Issue Summary
The issue on GitHub repo -> https://github.com/opsgenie/opsgenie-go-sdk-v2/issues/112
In the current design, it's throwing warnings of Could not set requestID when trying to query the Get-on-calls of Who-is-on-call-api endpoint.
The original issue description is as below:
We're getting a lot of warnings for Could not set requestId.
It seems to be coming from this line https://github.com/opsgenie/opsgenie-go-sdk-v2/blob/master/client/client.go#L149
Below is a sample of a response not containing the requestId as logged by this line https://github.com/opsgenie/opsgenie-go-sdk-v2/blob/master/client/client.go#L501 :
time=2022/10/31 08:50:01 level=debug msg=Request processed. The result: &{ResultMetadata:Unknown macro: {RequestId}Parent:{Id:a3f182a3-7860-40da-9832-d238cbe6d3aa Name:TEST_TEAM_schedule Enabled:true} OnCallParticipants:[] OnCallRecipients:[]}The endpoint in question is https://docs.opsgenie.com/docs/who-is-on-call-api#get-on-calls for the above log entry
Steps to Reproduce
- Make requests to Get On-calls via Go-SDK.
- Observe the result.
Expected Results
The request should be executed without warning.
Actual Results
The execution of this request throws the warning Could not set requestID.
Workaround
Change the loglevel to ErrorLevel the warning not appeared.
scheduleClient, err := schedule.NewClient(&client.Config
)