SyliusResourceBundle icon indicating copy to clipboard operation
SyliusResourceBundle copied to clipboard

java.lang.IllegalArgumentException: cannot treat nil as HTTP response for request to ''

Open uaalto opened this issue 9 years ago • 5 comments

This is an issue with the request, but probably Aleph should be able to handle it without an exception. Is that correct?

SEVERE: error in HTTP handler                                                                                                                                                                          
java.lang.IllegalArgumentException: cannot treat nil as HTTP response for request to ''  
 at aleph.http.server$invalid_value_response.invokeStatic(server.clj:132) 
 at aleph.http.server$invalid_value_response.invoke(server.clj:129) 
 at aleph.http.server$handle_request$fn__20360$fn__20361.invoke(server.clj:185) 
 at manifold.deferred$fn__17496$chain_SINGLEQUOTE____17517.invoke(deferred.clj:750) 
 at manifold.deferred$fn__17496$subscribe__17497$fn__17502.invoke(deferred.clj:716) 
 at manifold.deferred.Listener.onSuccess(deferred.clj:219) 
 at manifold.deferred.Deferred$fn__17350.invoke(deferred.clj:396) 
 at manifold.deferred.Deferred.success(deferred.clj:396) 
 at manifold.deferred$success_BANG_.invokeStatic(deferred.clj:243) 
 at manifold.deferred$success_BANG_.invoke(deferred.clj:240) 
 at manifold.deferred$catch_SINGLEQUOTE_$fn__17580.invoke(deferred.clj:959) 
 at manifold.deferred.Listener.onSuccess(deferred.clj:219) 
 at manifold.deferred.Deferred$fn__17350.invoke(deferred.clj:396) 
 at manifold.deferred.Deferred.success(deferred.clj:396) 
 at manifold.deferred$success_BANG_.invokeStatic(deferred.clj:243) 
 at manifold.deferred$success_BANG_.invoke(deferred.clj:240) 
 at manifold.deferred$fn__17496$chain_SINGLEQUOTE____17517.invoke(deferred.clj:737) 
 at manifold.deferred$fn__17496$subscribe__17497$fn__17498.invoke(deferred.clj:710) 
 at manifold.deferred.Listener.onSuccess(deferred.clj:219) 
 at manifold.deferred.Deferred$fn__17350.invoke(deferred.clj:396) 
 at manifold.deferred.Deferred.success(deferred.clj:396) 
 at manifold.deferred$success_BANG_.invokeStatic(deferred.clj:243) 
 at manifold.deferred$success_BANG_.invoke(deferred.clj:240) 
 at aleph.http.server$handle_request$fn__20345$f__16979__auto____20346.invoke(server.clj:153) 
 at clojure.lang.AFn.run(AFn.java:22) 
 at io.aleph.dirigiste.Executor$Worker$1.run(Executor.java:62) 
 at manifold.executor$thread_factory$reify__16871$f__16872.invoke(executor.clj:36) 
 at clojure.lang.AFn.run(AFn.java:22) 
 at java.lang.Thread.run(Thread.java:745) 
Jul 02, 2016 11:22:15 AM aleph.http.server invoke 

uaalto avatar Aug 02 '16 12:08 uaalto

@ztellman what's your opinion on this? Should it be the Aleph user code, or by the library itself?

uaalto avatar Aug 25 '16 10:08 uaalto

Hi, sorry for the delay in responding to this. In your original message, do you mean it's an issue with the response, because I don't understand how it's related to the request.

If you think this is something that Aleph should handle, how do you think it should handle it? An empty 200 response?

ztellman avatar Aug 25 '16 19:08 ztellman

Thanks @ztellman for your reply. Yes, I meant response, sorry. I actually don't know exactly how to reproduce this, I could only gather this log. Is it complaining of a handler resulting in nil? Maybe throw a more informative error so the user can identify the problem better and fix the handler (if that's the case).

uaalto avatar Aug 26 '16 12:08 uaalto

Yes, that's what's happening here. I can make the error message more helpful.

ztellman avatar Aug 28 '16 15:08 ztellman

That would be great! Thank you @ztellman

uaalto avatar Aug 28 '16 21:08 uaalto