Subject: | constraint failures aren't caught properly |
broken in the trunk 2004/10/07 snapshot too.
to reproduce add this to BeerDB.pm after BeerDB->setup:
BeerDB::Beer->require;
BeerDB::Beer->add_constraint('always_fail_constraint', name => sub { return 0 });
then try to add a new beer 'uuuuuu' at localhost/beerdb/beer/list
you'll get a "Not Found" page
error log shows this:
caught model error: validate_column_values error: name BeerDB::Beer name fails 'always_fail_constraint' constraint with 'uuuuu' at /usr/lib/perl5/site_perl/5.8.3/Class/Trigger.pm line 51
at /usr/lib/perl5/site_perl/5.8.3/Class/DBI/FromCGI.pm line 246
[Thu Oct 07 15:04:42 2004] [error] [client 10.20.2.9] File does not exist: /home/httpd/beerdb/beer, referer: http://qa/beerdb/beer/list