Show better error messages

Currently we're not returning the full error message hash to the client.  This fixes that problem, as well as adding a class to parse error messages, with some tests.