From 77b52d419f56e172567fd0b03e49dc4f11797353 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 29 Jun 2022 13:57:58 +0800 Subject: [PATCH] Update the `Multi-Tenancy.md` to explains the `MultiTenancyMiddlewareErrorPageBuilder`. --- docs/en/Multi-Tenancy.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/en/Multi-Tenancy.md b/docs/en/Multi-Tenancy.md index 2603cb0436..8b8480669f 100644 --- a/docs/en/Multi-Tenancy.md +++ b/docs/en/Multi-Tenancy.md @@ -32,6 +32,22 @@ Configure(options => > Multi-Tenancy is disabled in the ABP Framework by default. However, it is **enabled by default** when you create a new solution using the [startup template](Startup-Templates/Application.md). `MultiTenancyConsts` class in the solution has a constant to control it in a single place. +### AbpMultiTenancyOptions: Handle inactive and non-existent tenants. + +The `MultiTenancyMiddlewareErrorPageBuilder` of `AbpMultiTenancyOptions` is used to handle inactive and non-existent tenants. + +It will respond to an error page by default, you can change it if you want, eg: only output the error log and continue ASP NET Core's request pipeline. + +```csharp +Configure(options => +{ + options.MultiTenancyMiddlewareErrorPageBuilder = async (context, exception) => + { + // Handle the exception. + }; +}); +``` + ### Database Architecture ABP Framework supports all the following approaches to store the tenant data in the database;