Skip to content

Commit

Permalink
Update Error.razor
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Nov 17, 2023
1 parent 5337fb8 commit ace52e0
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions MyApp/Pages/Error.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,33 @@

<PageTitle>Error</PageTitle>

<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
<section class="flex-col md:flex-row flex justify-center mt-16 mb-16 md:mb-12">
<Heading1 class="text-danger">Error.</Heading1>
<Heading2 class="text-danger">An error occurred while processing your request.</Heading2>
</section>
<div class="mx-auto">
<div class="mx-auto prose lg:prose-xl mb-24">
@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}

@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}

<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
</div>
</div>

@code{
@code {
[CascadingParameter] public HttpContext? HttpContext { get; set; }

public string? RequestId { get; set; }
Expand Down

0 comments on commit ace52e0

Please sign in to comment.