Reworked implementation of custom error definition

Implementation has been reworked based on discussion from #280 and #221.
Passed implementation has been removed.
For consistency, make all of the keys here snake_cased.

Also, looks like they "internal_message" needs quotes.