[Dancer-users] status code needs to be an integer greater than or equal to 100...

Puneet Kishor punk.kish at gmail.com
Tue Jan 18 14:07:50 CET 2011

Alexis Sukrieh wrote:
> Le 17/01/2011 18:44, Puneet Kishor a écrit :
>> I ran the program on the command line, and then accessed it via curl, so
>> here is the entire error stream. Quite unhelpful, as it appears to me.
>> The error gets triggered as soon as I do a $sth->execute.
> I suggest you run the app either with Plack::Middleware::Debug enabled,
> or with the standalone server.
> Then you should have the details regarding the error you get.
> When you have "nice formated" errors, it's Dancer that speaks to you,
> when you have "Internal Server Error", it's Plack telling you it catched
> an error somewhere.

Right, you are correct. However, that doesn't help still. The error 
report, while nicely formatted, doesn't help at all. Here is another 
example I ran into yesterday that led to a couple of hours being wasted.

I was interpolating a hashes keys into a string. Except, I was calling 
for a key that didn't exist in the hash, like so (contrived example) --

'A ' . $h{'size'} . ' string that ' . $h{'resu'} . ' be ' . $h{'cond'}

I was assuming that my hash %h was like so

%h = (
   'size' => 'long', # or 'short'
   'resu' => 'may', # or 'may not'
   'cond' => 'corrupted # or 'fine'

I was wrong. One of the keys, say, 'size' didn't exist in the hash. 
Well, I kept on getting a very nicely formatted 'status code needs to be 
an integer greater than or equal to 100...' error in my browser.

So, it is not just the consistency of error that is important, it is 
also the usefulness of the error.

That said, I do realize that it is probably very difficult to make 
consistent and helpful error reporting especially given the variety of 
development environments. Perhaps, to make it easy then, the development 
team might make a "strong" recommendation of a development environment 
in order to make good error reporting possible.

Initially (when I first started using Dancer), I used the built in 
web-server. However, I moved to Apache very quickly, because I thought 
that perhaps I should develop using the same environment that I will 
eventually use in production, so I don't have to wrestle with Apache 
peculiarities later on. However, if I am guaranteed good error reporting 
with a "standard" development environment, I might want to substitute 
that for the potential pain of later moving to a different production 

Many thanks,

> Hope that helps.
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users

Puneet Kishor http://punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Fellow http://creativecommons.org/about/people/fellows#puneetkishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
Assertions are politics; backing up assertions with evidence is science

More information about the Dancer-users mailing list