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

?limit=10 throws error #25

Open
timwis opened this issue Feb 10, 2017 · 3 comments
Open

?limit=10 throws error #25

timwis opened this issue Feb 10, 2017 · 3 comments

Comments

@timwis
Copy link
Contributor

timwis commented Feb 10, 2017

I queried ?limit=10 by accident (it should be ?$limit=10 and noticed it threw a lambda/api gateway error. In theory, it should generate WHERE limit = 10, which should just throw a sql error. Indicates something failed and the error's being lost.

@timwis timwis added the bug label Feb 10, 2017
@timwis
Copy link
Contributor Author

timwis commented Feb 10, 2017

Looks like the error is being thrown in the peg grammar, pretty deep down the stack.

/Users/tim/Sites/soda-carto/node_modules/node-sqlparser/lib/parse.js:8084
      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
      ^
SyntaxError: Expected "(" or WHITE_SPACE but "=" found.

We might need to call this one "wontfix"...

@timwis timwis added wontfix and removed bug labels Feb 10, 2017
@zingbot zingbot moved this from Next to Backlog in Reverse Proxy Implementation Feb 16, 2017
@andrewbt
Copy link
Contributor

The problem can't be as simple as, there's a query string variable defined for $limit but not limit? Is it deeper than that?

Also, limit doesn't seem like valid SODA, so I agree with your assessment of 'wontfix' if needed... this would be like a "typo convenience feature", no?

@timwis
Copy link
Contributor Author

timwis commented Feb 24, 2017

hah, yeah, let's call it that :P

The reverse proxy puts anything that doesn't have a leading dollar sign as part of the where clause. It's probably because the where clause fields aren't wrapped in quotes or something, so the parser assumes it's the limit.

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

No branches or pull requests

2 participants