Example #1
0
        internal override void OnInitialization()
        {
            base.OnInitialization();

            _helper = Helper as IExceptionHandlerHelper;
            _helper.OnInitialization();
        }
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IExceptionHandlerHelper exceptionHandlerHelper, ILogger <Startup> logger)
        {
            app.UseExceptionHandler(applicationBuilder =>
            {
                applicationBuilder.Run(async context => { await exceptionHandlerHelper.HandleExceptionAsync(context, _clientErrorMapping, logger); });
            });

            app.UseHttpsRedirection();
            app.UseRouting();
            app.UseAuthorization();

            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
        }