Clean up exception raising.
Parse out JSON error string in the client.