An error will raise, and this error will be handled as REST hooks configured. By default, connection will be closed, and publish or play request will fail.
If you use default backend only, all REST hooks can be disabled with option
disable_rest_requests=true