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

Event calls with incorrect alert_type fail silently #215

Closed
onlyanegg opened this issue Jul 1, 2017 · 1 comment
Closed

Event calls with incorrect alert_type fail silently #215

onlyanegg opened this issue Jul 1, 2017 · 1 comment

Comments

@onlyanegg
Copy link

In the event api, post event calls with incorrect alert_type fail silently. I would expect some type checking to be done and an error to be returned.

I'm using the Python API. Stepping into create() in events.py I can see params contains the following:

{
  "date_happened": None,
  "alert_type": "ahhhh",
  "tags": None,
  "text": "testing  events",
  "title": "test",
  "priority": None,
  "host": None,
  "aggregation_key": None,
  "source_type_name": None
}

Here's the response:

{
  "status": "ok",
  "event": {
    "date_happened": 1498946344,
    "handle": null,
    "title": "test",
    "url": "https://app.datadoghq.com/event/event?id=1138017950882477404",
    "text": "testing datadog events",
    "tags": null,
    "priority": null,
    "related_event_id": null,
    "id": 1138017950882477400
  }
}

But no event gets created in the UI. I understand that alert_type can be one of "error", "warning", "info", and "success", but I would expect there to be an error response for incorrect alert types.

@dabcoder
Copy link
Contributor

Apologies for the very late response, but we aimed to fix this in #467 thanks for the feedback.

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

2 participants