Skip to content

Commit

Permalink
Merge pull request #34534 from dsyer
Browse files Browse the repository at this point in the history
* gh-34534:
  Polish "Clarify conventions for custom error pages in WebFlux"
  Clarify conventions for custom error pages in WebFlux

Closes gh-34534
  • Loading branch information
scottfrederick committed Mar 21, 2023
2 parents bf48c6c + 1c05ad2 commit f234980
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ include::code:MyExceptionHandlingController[]

[[web.reactive.webflux.error-handling.error-pages]]
===== Custom Error Pages
If you want to display a custom HTML error page for a given status code, you can add a file to an `/error` directory.
If you want to display a custom HTML error page for a given status code, you can add views that resolve from `error/*`, for example by adding files to a `/error` directory.
Error pages can either be static HTML (that is, added under any of the static resource directories) or built with templates.
The name of the file should be the exact status code or a series mask.
The name of the file should be the exact status code, a status code series mask, or `error` for a default if nothing else matches.
Note that the path to the default error view is `error/error`, whereas with Spring MVC the default error view is `error`.

For example, to map `404` to a static HTML file, your directory structure would be as follows:

Expand Down

0 comments on commit f234980

Please sign in to comment.