You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like it's because of the new fields that got added to the Service type, SupportHours and ScheduledActions. I think adding omitempty to both should fix this.
The lack of `omitempty` on these fields is causing `CreateService` calls to fail
when both are omitted. This broke in the v1.4.0 release so this is a bug fix.
Relates to #348Fixes#346
Have an existing module used to create a service with 1.3.0, which now fails following update to 1.4.x
Steps to reproduce:
Create API client using API token:
client := pagerduty.NewClient(*currentModel.PagerDutyToken)
Get escalation policy:
escalationpolicy, err := client.GetEscalationPolicy(*currentModel.EscalationPolicyID, &pagerduty.GetEscalationPolicyOptions{})
Populate service params:
service := pagerduty.Service{ Name: *currentModel.Name, Description: *currentModel.Description, EscalationPolicy: *EscalationPolicy, }
Create service:
res, err := client.CreateService(service)
The error caught in 1.4.x is:
HTTP response failed with status code 400, message: Invalid Input Provided (code: 2001)
In 1.3.0 this creates successfully.
Have tested this with the same code and variables across both versions, and can confirm rolling back to 1.3.0 works as expected once again.
The text was updated successfully, but these errors were encountered: