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

try expressions doesn't work inside routes #240

Open
alaviss opened this issue Feb 24, 2020 · 0 comments
Open

try expressions doesn't work inside routes #240

alaviss opened this issue Feb 24, 2020 · 0 comments

Comments

@alaviss
Copy link
Contributor

alaviss commented Feb 24, 2020

import json, jester

routes:
  post "/":
    let input =
      try:
        request.body.parseJson()
      except:
        resp Http400

Got:

test.nim(7, 21) Error: expression 'parseJson(body(request))' is of type 'JsonNode' and has to be discarded

I'm on jester 0.4.3 with nim devel.

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

No branches or pull requests

1 participant