use ErrorException for errors sending, add expect_json decorator for connections