Skip to content

Response could not be parsed, invalid character '<' looking for beginning of value #147

@madpipeline

Description

@madpipeline

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions