Creating, using and customizing error pages to enhance user experience.
Questions tagged [custom-error-pages]
503 questions
148
votes
3 answers
How to specify the default error page in web.xml?
I am using element in web.xml to specify the friendly error page when user encounters a certain error such as error with code of 404:
404
…

ipkiss
- 13,311
- 33
- 88
- 123
122
votes
10 answers
Routing for custom ASP.NET MVC 404 Error page
I am trying to make a custom HTTP 404 error page when someone types in a URL
that doesn't invoke a valid action or controller in ASP.NET MVC, instead of it displaying the generic "Resource Not Found" ASP.NET error.
I don't want to use the web.config…

dswatik
- 9,129
- 10
- 38
- 53
115
votes
10 answers
ASP.NET custom error page - Server.GetLastError() is null
I have a custom error page set up for my application:
In Global.asax, Application_Error(), the following code works to get the exception details:
Exception ex =…

nailitdown
- 7,868
- 11
- 36
- 37
111
votes
6 answers
ASP.NET MVC HandleError
How do I go about the [HandleError] filter in asp.net MVC Preview 5?
I set the customErrors in my Web.config file

Boris Callens
- 90,659
- 85
- 207
- 305
55
votes
4 answers
nginx not serving my error_page
I have a Sinatra application hosted with Unicorn, and nginx in front of it. When the Sinatra application errors out (returns 500), I'd like to serve a static page, rather than the default "Internal Server Error". I have the following nginx…

François Beausoleil
- 16,265
- 11
- 67
- 90
52
votes
4 answers
Rewrite URL after redirecting 404 error htaccess
So I know this may seem a little strange but I for sake of consistency, I would like all my urls to appear in this form:
http://example.com/page/
So far I have gotten the regular pages working but I cannot seem to get the error pages working…

godismyjudge95
- 922
- 1
- 9
- 15
39
votes
3 answers
How to show user-friendly error page in browser when runtime exception is thrown by servlet?
I'm developing web-application with JSF. I tested it as I was able to but from time to time runtime exceptions are thrown.
So, how to redirect user to special error page every time an exception is thrown (instead of displaying 500 Error with full…

Roman
- 64,384
- 92
- 238
- 332
38
votes
2 answers
Show user-friendly error page instead of exception in Flutter
Is it possible to make global error handling that will show user-friendly error page instead of showing red exception?
I already made error handling (here) that will report exception to the backend but what I really would like to achieve is to hide…

Anis Alibegić
- 2,941
- 3
- 13
- 28
34
votes
6 answers
ASP.NET MVC 5 Custom Error Page
I am using a custom authorize attribute in a ASP.NET MVC 5 application like following:
public class CustomAuthorizeAttribute : AuthorizeAttribute
{
protected override void HandleUnauthorizedRequest(AuthorizationContext context)
{
if…

Haider
- 1,488
- 2
- 15
- 29
29
votes
5 answers
Implementing a Custom Error page on an ASP.Net website
I have an ASP.Net website and I want to use a custom error page. I put the following code in my web.config
The problem is…

Yeodave
- 978
- 1
- 8
- 15
28
votes
7 answers
How to get the message in a custom error page (Tomcat)?
In JSPs, you may use response.sendError(int code, String message) to return a particular error code (eg 404 for not found) and a message as well.
These messages display fine, as long as you use the default ugly Tomcat error pages. However, if you…

Lea Verou
- 23,618
- 9
- 46
- 48
23
votes
4 answers
How do I display custom error pages in Asp.Net Mvc 3?
I want all 401 errors to be be redirected to a custom error page. I have initially setup the following entry in my web.config.

Ahmad
- 22,657
- 9
- 52
- 84
18
votes
2 answers
ViewExpiredException shown in java.lang.Throwable error-page in web.xml
I'm working on a JSF web application in which I need to bring up a "Session Expired" page if the view expires, but a general technical error page for all others. The application only goes to the technical error page when I trigger the exception. …

Luke
- 181
- 1
- 1
- 3
16
votes
2 answers
Custom errors not working with IISExpress
I have a asp.net mvc application and am trying to get custom errors working with IISExpress.
Works in Casini fine:
When I've…

Ben Foster
- 34,340
- 40
- 176
- 285
16
votes
3 answers
What are the 404;1, 404;2 etc HTTP error codes for?
In IIS I can configure my custom error pages.
For each HTTP Error code I can say where to go. Several codes have a number of "sub" codes available. For example 404 has a regular 404, 404;1, 404;2 and so on..
What are they for? When are they…

Boris Callens
- 90,659
- 85
- 207
- 305