Skip to content

"Test it" tool for AI ask is prepopulated with erroneous request body #2433

@benjamincburns

Description

@benjamincburns

It appears that all of the AI ask endpoints descriptions on this page show the body as only requiring a query parameter. However, if you go to run a request via the "Test it" button on that page, the editor loads with the following request body prepopulated:

{
  "query": "",
  "previousQueries": [
    null
  ]
}

If you fill in your query and run it as-is, without editing the contents of the previousQueries array, you'll get the following 422 error response:

{
  "error": {
    "code": 422,
    "message": "body.previousQueries.0: expected a string"
  }
}

Editing the body to make previousQueries be an empty array, or deleting previousQueries entirely causes the request to succeed. Given that previousQueries is deprecated and appears to no longer be functional, I'd think it should be removed from the "Test it" tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions