Merge branch 'pr/157' into release-candidates/rc-5.90116
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request.pm
index e4cb5c2..e6e8657 100644 (file)
@@ -132,8 +132,11 @@ sub _build_body_data {
       my $fh = $self->body;
       local $_ = $fh;
       return $self->data_handlers->{$match}->($fh, $self);
-    } else { 
-      Catalyst::Exception->throw("$content_type is does not have an available data handler");
+    } else {
+      Catalyst::Exception->throw(
+        sprintf '%s does not have an available data handler. Valid data_handlers are %s.',
+          $content_type, join ', ', sort keys %{$self->data_handlers}
+      );
     }
 }