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

upload: Gracefully handle JSON parse errors #292

Open
ChrisCummins opened this issue Feb 21, 2014 · 0 comments
Open

upload: Gracefully handle JSON parse errors #292

ChrisCummins opened this issue Feb 21, 2014 · 0 comments

Comments

@ChrisCummins
Copy link
Owner

At the moment we get a 500 response:

java.lang.Exception: JSON error (unexpected character): S

clojure.data.json$_read.invoke(json.clj:226)
clojure.data.json$read.doInvoke(json.clj:272)
clojure.lang.RestFn.invoke(RestFn.java:410)
clojure.lang.AFn.applyToHelper(AFn.java:161)
clojure.lang.RestFn.applyTo(RestFn.java:132)
clojure.core$apply.invoke(core.clj:603)
clojure.data.json$read_str.doInvoke(json.clj:278)
clojure.lang.RestFn.invoke(RestFn.java:410)
pip_db.models.upload$parse_json_file.invoke(upload.clj:17)
pip_db.controllers.upload$post_handler.invoke(upload.clj:15)
pip_db.middleware$fn__257.invoke(middleware.clj:33)
compojure.core$make_route$fn__1568.invoke(core.clj:94)
compojure.core$if_route$fn__1556.invoke(core.clj:40)
compojure.core$if_method$fn__1549.invoke(core.clj:25)
compojure.core$routing$fn__1574.invoke(core.clj:107)
clojure.core$some.invoke(core.clj:2390)
compojure.core$routing.doInvoke(core.clj:107)
clojure.lang.RestFn.applyTo(RestFn.java:139)
clojure.core$apply.invoke(core.clj:603)
compojure.core$routes$fn__1578.invoke(core.clj:112)
pip_db.middleware$wrap_exception$fn__259.invoke(middleware.clj:42)
ring.middleware.cookies$wrap_cookies$fn__1151.invoke(cookies.clj:171)
ring.middleware.params$wrap_params$fn__121.invoke(params.clj:58)
ring.middleware.multipart_params$wrap_multipart_params$fn__156.invoke(multipart_params.clj:107)
ring.adapter.jetty$proxy_handler$fn__214.invoke(jetty.clj:18)
ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown Source)
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
org.eclipse.jetty.server.Server.handle(Server.java:349)
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
java.lang.Thread.run(Thread.java:744)
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

1 participant