diff --git a/src/IoTHub.Portal.Server/Startup.cs b/src/IoTHub.Portal.Server/Startup.cs index 0546862f1..7798f6f12 100644 --- a/src/IoTHub.Portal.Server/Startup.cs +++ b/src/IoTHub.Portal.Server/Startup.cs @@ -110,6 +110,13 @@ public void ConfigureServices(IServiceCollection services) Status = StatusCodes.Status500InternalServerError }); + setup.Map(exception => new ProblemDetails + { + Title = exception.Title, + Detail = exception.Detail, + Status = StatusCodes.Status404NotFound + }); + setup.Map(exception => new ProblemDetails { Title = exception.Title,