Deserialize the byte object to text - and check the contents of both error (error should be empty) and out (you can just do a simple .contains or something).