Adds a reusable method to render API response on validation failure.
Authored by: jplang 2010-12-03
Parent: [r4454]
Child: [r4456]