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

Handle missing description fields in create detector API #437

Closed
ohltyler opened this issue Mar 15, 2022 · 0 comments · Fixed by #438
Closed

Handle missing description fields in create detector API #437

ohltyler opened this issue Mar 15, 2022 · 0 comments · Fixed by #438
Labels
bug Something isn't working v2.0.0

Comments

@ohltyler
Copy link
Member

ohltyler commented Mar 15, 2022

As pointed out in this issue, the create API does not reject the missing description field, even though it's listed as Required in the API. So, if a user submits an API request with all valid fields but a missing description field, then it leads to a missing description field in the system index, and parsing failures on the frontend and backend plugins, as it's expecting that field to exist (regardless of if it's value is populated or not). This creates confusion, since the raw response shows as successful when it actually is not. Details on the errors in the linked issue.

I see 2 possible paths forward:

  1. Change to Not required, and handle the missing field in the backend similar to the other not required fields (e.g., filter_query/window_delay/category_field). Since it's listed as optional on the frontend, this aligns better from a user POV.
  2. Leave as Required, and reject the request if it's missing in the body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant