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

Discovery API: Return distinct error message for queries over max length #1276

Open
1 task
LtChae opened this issue Jul 27, 2021 · 0 comments
Open
1 task

Comments

@LtChae
Copy link
Contributor

LtChae commented Jul 27, 2021

What

  • Discovery API returns a 400 response and a descriptive error message when exceeding presto's max query length

Why

As a data consumer I would like to receive descriptive, actionable errors so that I can fix issues with queries I am developing.

Notes:

Queries are sent to presto in the header of the request.
See below for error example.

     {:ok,
         %Tesla.Env{
           __client__: %Tesla.Client{adapter: nil, fun: nil, post: [], pre: []},
           __module__: Prestige.Client.RequestStream,
           body: "<h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>",
           headers: [
             {"content-type", "text/html;charset=iso-8859-1"},
             {"content-length", "74"},
             {"connection", "close"}
           ],
           method: :post,
           opts: [],
           query: [],
           status: 431,
           url: "http://kdp-kubernetes-data-platform-presto.kdp:8080/v1/statement"
         }}

Tested with a query over 6900 characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants