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

[BUG] Misleading error message parsing named params with feature flag disabled #513

Closed
dbwiddis opened this issue Feb 9, 2024 · 0 comments · Fixed by #514
Closed

[BUG] Misleading error message parsing named params with feature flag disabled #513

dbwiddis opened this issue Feb 9, 2024 · 0 comments · Fixed by #514
Labels
bug Something isn't working

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Feb 9, 2024

What is the bug?

When attempting to use an API with a named param, the param is not parsed before the check if the API is disabled. This gives a misleading error message to the user.

How can one reproduce the bug?

  1. Do not enable the feature flag.
  2. Call the create workflow API with ?provision=true
  3. Observe error:
{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "request [/_plugins/_flow_framework/workflow] contains unrecognized parameter: [provision]"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "request [/_plugins/_flow_framework/workflow] contains unrecognized parameter: [provision]"
    },
    "status": 400
}

What is the expected behavior?

{
    "error": "This API is disabled. To enable it, set [plugins.flow_framework.enabled] to true."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant