@using Microsoft.AspNetCore.Hosting @using Yavsc.Models @inject IWebHostEnvironment Env @model object @{ ViewBag.Title = "Error"; }

Error.

@if (Env.IsDevelopment()) {

An unhandled exception occurred while processing your request.

if (Model is Exception exception) {
@exception.ToString()
} else if (Model is ErrorViewModel errorViewModel && !string.IsNullOrWhiteSpace(errorViewModel.Description)) {
@errorViewModel.Description
} } else {

An error occurred while processing your request.

if (Model is ErrorViewModel errorViewModel) { if (errorViewModel.ShowRequestId) {

Request ID: @errorViewModel.RequestId

} if (!string.IsNullOrWhiteSpace(errorViewModel.Description)) {

@errorViewModel.Description

} } }