[drakma-devel] misleading error message

Daniel Janus daniel at sentivision.com
Fri Feb 8 16:50:56 UTC 2008


Hello list, 

I've just found out that the following call to HTTP-REQUEST:

   (http-request "http://some.secret/uri" 
                 :method :post
                 :parameters '(("TextField")))

yields the following error (very confusing, especially if the HTTP-REQUEST is 
buried deep on the call stack and its arguments are not outright visible) 
against Drakma 0.11.3:

   Illegal argument to file-namestring: NIL.
      [Condition of type TYPE-ERROR]

This is because the cdr of one of the parameters (here, the only one) is nil, 
so it gets catched by the last OR clause in the last COND clause in
DRAKMA::MAKE-FORM-DATA-FUNCTION, which causes the spurious error.

Would it be possible to reformulate the message so that it's more clear
what happened?

Best regards, 
-- 
Daniel Janus <daniel at sentivision.com>



More information about the Drakma-devel mailing list