Repository: dotnet/aspnetcore
File: src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsNoInteractivityStartup.cs (C#)

Code before:
            options.MaxFormMappingErrorCount = 10;
            options.MaxFormMappingRecursionDepth = 5;
            options.MaxFormMappingCollectionSize = 100;
        });
        services.AddHttpContextAccessor();
        services.AddCascadingAuthenticationState();
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        var enUs = new CultureInfo("en-US");
        CultureInfo.DefaultThreadCurrentCulture = enUs;
        CultureInfo.DefaultThreadCurrentUICulture = enUs;

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.Map("/subdir", app =>
        {
            app.Map("/reexecution", reexecutionApp =>
            {
                reexecutionApp.UseStaticFiles();
                reexecutionApp.UseStatusCodePagesWithReExecute("/not-found-reexecute", createScopeForErrors: true);
                reexecutionApp.UseRouting();
                RazorComponentEndpointsStartup<TRootComponent>.UseFakeAuthState(reexecutionApp);
                reexecutionApp.UseAntiforgery();
                reexecutionApp.UseEndpoints(endpoints =>
                {
                    endpoints.MapRazorComponents<TRootComponent>();
                });
            });

            ConfigureSubdirPipeline(app, env);
        });
    }

    private void ConfigureSubdirPipeline(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (!env.IsDevelopment())
        {
            app.UseExceptionHandler("/Error", createScopeForErrors: true);
        }

        app.UseStaticFiles();
        app.UseRouting();
        RazorComponentEndpointsStartup<TRootComponent>.UseFakeAuthState(app);
        app.UseAntiforgery();
        app.UseEndpoints(endpoints =>

Review comment (suggestion):
We seem to have removed from here. Is it intentional?
```
            if (!env.IsDevelopment())
            {
                app.UseExceptionHandler("/Error", createScopeForErrors: true);
            }
```

Code after:
            options.MaxFormMappingErrorCount = 10;
            options.MaxFormMappingRecursionDepth = 5;
            options.MaxFormMappingCollectionSize = 100;
        });
        services.AddHttpContextAccessor();
        services.AddCascadingAuthenticationState();
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        var enUs = new CultureInfo("en-US");
        CultureInfo.DefaultThreadCurrentCulture = enUs;
        CultureInfo.DefaultThreadCurrentUICulture = enUs;

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.Map("/subdir", app =>
        {
            app.Map("/reexecution", reexecutionApp =>
            {
                if (!env.IsDevelopment())
                {
                    app.UseExceptionHandler("/Error", createScopeForErrors: true);
                }

                reexecutionApp.UseStatusCodePagesWithReExecute("/not-found-reexecute", createScopeForErrors: true);
                reexecutionApp.UseStaticFiles();
                reexecutionApp.UseRouting();
                RazorComponentEndpointsStartup<TRootComponent>.UseFakeAuthState(reexecutionApp);
                reexecutionApp.UseAntiforgery();
                reexecutionApp.UseEndpoints(endpoints =>
                {
                    endpoints.MapRazorComponents<TRootComponent>();
                });
            });

            ConfigureSubdirPipeline(app, env);
        });
    }

    private void ConfigureSubdirPipeline(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (!env.IsDevelopment())
        {
            app.UseExceptionHandler("/Error", createScopeForErrors: true);
        }