From daniel at sentivision.com Fri Feb 8 16:50:56 2008 From: daniel at sentivision.com (Daniel Janus) Date: Fri, 8 Feb 2008 17:50:56 +0100 Subject: [drakma-devel] misleading error message Message-ID: <200802081750.56129.daniel@sentivision.com> 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 From edi at agharta.de Fri Feb 8 17:06:12 2008 From: edi at agharta.de (Edi Weitz) Date: Fri, 08 Feb 2008 18:06:12 +0100 Subject: [drakma-devel] misleading error message In-Reply-To: <200802081750.56129.daniel@sentivision.com> (Daniel Janus's message of "Fri, 8 Feb 2008 17:50:56 +0100") References: <200802081750.56129.daniel@sentivision.com> Message-ID: On Fri, 8 Feb 2008 17:50:56 +0100, Daniel Janus wrote: > Would it be possible to reformulate the message so that it's more > clear what happened? Sure. Wanna send a patch? Edi. From daniel at sentivision.com Fri Feb 8 17:09:24 2008 From: daniel at sentivision.com (Daniel Janus) Date: Fri, 8 Feb 2008 18:09:24 +0100 Subject: [drakma-devel] misleading error message In-Reply-To: References: <200802081750.56129.daniel@sentivision.com> Message-ID: <200802081809.24320.daniel@sentivision.com> On Friday 08 February 2008 18:06:12 Edi Weitz wrote: > > Would it be possible to reformulate the message so that it's more > > clear what happened? > > Sure. Wanna send a patch? I should be able to on Monday. Best, -- Daniel Janus From daniel at sentivision.com Fri Feb 8 17:24:58 2008 From: daniel at sentivision.com (Daniel Janus) Date: Fri, 8 Feb 2008 18:24:58 +0100 Subject: [drakma-devel] misleading error message In-Reply-To: <200802081809.24320.daniel@sentivision.com> References: <200802081750.56129.daniel@sentivision.com> <200802081809.24320.daniel@sentivision.com> Message-ID: <200802081824.58479.daniel@sentivision.com> On Friday 08 February 2008 18:09:24 Daniel Janus wrote: > On Friday 08 February 2008 18:06:12 Edi Weitz wrote: > > > Would it be possible to reformulate the message so that it's more > > > clear what happened? > > > > Sure. Wanna send a patch? > > I should be able to on Monday. Actually, I found a few more minutes and came up with the attached patch, which changes the error to "Don't know what to do with NIL in multipart/form-data body.". -- Daniel Janus Senior Software Engineer, SENTIVISION Mb: +48.501180396 | Ph: +48.226400860 -------------- next part -------------- A non-text attachment was scrubbed... Name: drakma.patch Type: text/x-diff Size: 646 bytes Desc: not available URL: From edi at agharta.de Wed Feb 13 15:25:25 2008 From: edi at agharta.de (Edi Weitz) Date: Wed, 13 Feb 2008 16:25:25 +0100 Subject: [drakma-devel] New release 0.11.4 (Was: misleading error message) In-Reply-To: <200802081824.58479.daniel@sentivision.com> (Daniel Janus's message of "Fri, 8 Feb 2008 18:24:58 +0100") References: <200802081750.56129.daniel@sentivision.com> <200802081809.24320.daniel@sentivision.com> <200802081824.58479.daniel@sentivision.com> Message-ID: On Fri, 8 Feb 2008 18:24:58 +0100, Daniel Janus wrote: > Actually, I found a few more minutes and came up with the attached > patch, which changes the error to "Don't know what to do with NIL in > multipart/form-data body.". That's not entirely correct - you have to check for the CAR, not for the CDR. But I've now uploaded a version which hopefully has better error messages for cases like this one (and others as well). Thanks, Edi.