Uploaded image for project: 'Opsgenie'
  1. Opsgenie
  2. OPSGENIE-1121

Get On Calls request via Go SDK is incorrectly handled and prompting a warning of Could not set requestId

XMLWordPrintable

      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

      1. Make requests to Get On-calls via Go-SDK.
      2. 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

      { ApiKey: apiKey, LogLevel: logrus.ErrorLevel, }

      )

              Unassigned Unassigned
              dlee4@atlassian.com Darryl Lee
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: