Convenience method to send errors to client