Add server-side error message handler.