Catalyst::Plugin::ErrorCatcher - now with parameters

Following on from a recent feature request I’ve released version 0.0.8.10 of Catalyst::Plugin::ErrorCatcher.

The reports from the module now include POST and GET parameters for the request. Also included, if present, is the referer header value.

The new information looks like this:

     URI: http://localhost/foo/referer?fruit=banana&animal=kangaroo
  Method: POST
 Referer: http://garlic-weapons.tv

Params (GET):
  animal: kangaroo
   fruit: banana

Params (POST):
   slayer: kendra
  vampire: joe random

I’ve included some support for ‘long’ values. Anything longer than an arbitrary length chosen by me for no good reason other than it felt right will:

  • be checked with File::Type to see if it’s likely to be a file of some kind
  • truncated (and marked as such) if it’s text (application/octet-stream)

Output including these checks looks like this:

Params (GET):
  fruit: bananabananabananabananabananabananabana...[truncated]

Params (POST):
  image_gif: image/gif
  image_png: image/x-png
  long_text: kangarookangarookangarookangarookangaroo...[truncated]
   pdf_file: application/pdf

I haven’t provided any options or methods to:

  • change the value of ‘too long’
  • view the full value of something that’s ‘too long’

If they become necessary I’ll consider them as required.

2 Comments

Just a nitpick… they aren’t GET and POST parameters, they’re query and body parameters. The Catalyst::Request methods are named that way too.

Leave a comment

About Chisel

user-pic I blog about Perl.