RUBY-791 Verify server responses and raise exceptions if invalid