Skip to content

Commit

Permalink
the default model class is ErrorViewModel, not ErrorModel (dotnet…
Browse files Browse the repository at this point in the history
…#8376)

* the default model class is `ErrorViewModel`, not `ErrorModel`

You can see the correct name is already used the the code sample two sentences down

* Update error-handling.md
  • Loading branch information
johnmwright authored and Rick-Anderson committed Sep 4, 2018
1 parent 0139937 commit 1e22e84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aspnetcore/fundamentals/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Configure an exception handler page to use when the app isn't running in the `De

[!code-csharp[](error-handling/samples/2.x/ErrorHandlingSample/Startup.cs?name=snippet_DevExceptionPage&highlight=11)]

In a Razor Pages app, the [dotnet new](/dotnet/core/tools/dotnet-new) Razor Pages template provides an Error page and `ErrorModel` page model class in the *Pages* folder.
In a Razor Pages app, the [dotnet new](/dotnet/core/tools/dotnet-new) Razor Pages template provides an Error page and an error `PageModel` class in the *Pages* folder.

In an MVC app, don't decorate the error handler action method with HTTP method attributes, such as `HttpGet`. Explicit verbs prevent some requests from reaching the method. Allow anonymous access to the method so that unauthenticated users are able to receive the error view.

Expand Down

0 comments on commit 1e22e84

Please sign in to comment.