Receiving error:
ERRO[2024-08-28T16:08:21.337077196+03:00] Response could not be parsed, invalid character '<' looking for beginning of value
main_test.go:59: Failed to fetch OpsGenie Alerts: Response could not be parsed, invalid character '<' looking for beginning of value
when trying doing:
alertClient, err := alert.NewClient(&client.Config{
ApiKey: opsGenieAPIKey,
OpsGenieAPIURL: "mycompany.app.opsgenie.com",
})
if err != nil {
t.Logf("Failed to create OpsGenie Alert Client: %s", err.Error())
t.FailNow()
}
t.Log("Fetching OpsGenie Alerts...")
listAlertResult, err := alertClient.List(context.Background(), &alert.ListAlertRequest{
SearchIdentifier: queueName,
})
The documentation does not list which of the fields of ListAlertRequest are mandatory, and there is no example code on how to use the List() function properly.