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

clack backend payload #37

Open
boogsbunny opened this issue May 4, 2024 · 0 comments
Open

clack backend payload #37

boogsbunny opened this issue May 4, 2024 · 0 comments

Comments

@boogsbunny
Copy link

Hey, I'm having issues with JSON parsing.

I run into this issue when using clack as the backend:

Callback Error: the message-complete callback failed
  The value
    NIL
  is not of type
    VECTOR
  when binding WOO.EV.SOCKET::DATA
   [Condition of type FAST-HTTP.ERROR:CB-MESSAGE-COMPLETE]

Here's the route:

(defroute foo (:post :application/json)
  (let* ((json (handler-case
                   (cl-json:decode-json-from-string
                    (payload-as-string))
                 (error (e)
                   (http-condition 400 "Malformed JSON (~a)!" e)))))))

and the JSON passed in is just {"user": "hi"}. It seems that read-sequence fails when wanting to read the raw body from clack.

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