[Dbix-class] Is there a framework for translating raw database errors into human-readable errors

Robert Rothenberg robrwo at gmail.com
Wed May 30 08:31:29 GMT 2012


I am working on a web application and would like to translate (Postgres)
database error messages into human readable forms, e.g. catching errors like

  qr/null value in column "name" violates not-null constraint/

and returning a message to the user like

  The Name field cannot be blank.

Before I write my own, is there an existing framework?

(Yes, the plans are to validate some user input in JavaScript, but a
requirement is that the system work without JavaScript. I could also write
wrapper functions that separately validate the data before submitting it,
but that seems to be a duplication of work.)




More information about the DBIx-Class mailing list