Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero StartMin, EndMin omitempty on Restriction #11

Closed
imamfzn opened this issue Jul 17, 2019 · 2 comments
Closed

Zero StartMin, EndMin omitempty on Restriction #11

imamfzn opened this issue Jul 17, 2019 · 2 comments

Comments

@imamfzn
Copy link

imamfzn commented Jul 17, 2019

Hei, i'm trying to use create rotation (with time restrict) from the sdk. But there error:
Error occurred with Status code: 422, Message: Request body is not processable. Please check the errors., Took: 0.005000, RequestId: efeac8ca-a11f-4e5d-aceb-5eb3ca8cefab, Error Detail: map[endMin:may not be null startMin:may not be null]

I set the restrict StartMin, and EndMin to 0. But i think it was omitted by json: omitempty.
I think the StartMin, and EndMin should not set as omitempty, because it makes no value when requesting to the opsgenie api.

I think, we must change / remove the omitempty tags of StartMin and EndMin on Restriction struct

Thanks!

@imamfzn imamfzn changed the title Zero StartMin, EndMin omitempty Zero StartMin, EndMin omitempty on Restriction Jul 17, 2019
@cglrkn
Copy link
Contributor

cglrkn commented Aug 2, 2019

We created an issue on our side to fix that problem that you are having. We will inform you when it is fixed. Thanks for your contribution.

@ErenKizilay
Copy link
Contributor

The problem should be resolved with this #16
Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants