simplified json errors and made them more consistent. no more exiting in
the middle of http requests.