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
If you call list_events with a float, no client-side validation rejects this, but the API server doesn't handle floats, and the request fails.
To Reproduce
Steps to reproduce the behavior:
Do list_events(1, 1). This works (returns an empty list generally).
Do list_events(1.0, 1.0). This fails with an obscure error:
HTTP response body: {"errors": ["The value provided for parameter 'start' is invalid"]}
Expected behavior
Either this library should coerce to int (dropping the fractional part) or raise some sort of validation error before sending the request.
Environment and Versions (please complete the following information):
$ pip list | grep datadog
datadog-api-client 1.0.0b6
Additional context
datetime.timestamp() returns a float, which is how I was trying to use this method.
Also the documentation examples could be better. They specify the ints 1 and 1 for both start and end, a thing that would never happen. Suggest showing something relative to datetime.utcnow().
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
If you call
list_events
with a float, no client-side validation rejects this, but the API server doesn't handle floats, and the request fails.To Reproduce
Steps to reproduce the behavior:
list_events(1, 1)
. This works (returns an empty list generally).list_events(1.0, 1.0)
. This fails with an obscure error:Expected behavior
Either this library should coerce to int (dropping the fractional part) or raise some sort of validation error before sending the request.
Environment and Versions (please complete the following information):
Additional context
datetime.timestamp()
returns a float, which is how I was trying to use this method.Also the documentation examples could be better. They specify the ints
1
and1
for both start and end, a thing that would never happen. Suggest showing something relative todatetime.utcnow()
.The text was updated successfully, but these errors were encountered: