Use Rails exception_app to render application 404/500 errors