making the error reporting more consistent

both ws and http now return an 'error' attribute (instead of 'message')
http will also return a suitable status code as well.