Questions tagged [custom-errors]
CustomErrors is a mechanism used to provide custom error pages in ASP.NET based web applications.
319
questions
0
votes
1
answer
24
views
Custom ES6 errors in Node.js [closed]
I'm creating a class for a custom error but I'm struggling with the stackTrace. This is my code:
const errorMessages = require('./errorMessages.json');
class ArgumentNotValid extends Error {
...
0
votes
1
answer
32
views
How to calculate amount of isolated vertices using adjacency matrix
I've got stuck with the problem of counting amount of isolated vertices in the graph. Below you will see the code
#include <iostream>
#include <vector>
#define V 4 // amount of vertices in ...
2
votes
1
answer
86
views
What is the relation between CustomErrors web.config setting and azure app insights logging?
Link: https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-exceptions#prior-versions-support
If the CustomErrors configuration is Off, then exceptions will be
available for the HTTP ...
0
votes
0
answers
71
views
how to put condition on web config customerror for same status code
Condition inside the custom error for the same statuscode based on language from URL
Currently I am using below
<system.web>
<customErrors defaultRedirect="/en/acc/home.aspx" ...
0
votes
1
answer
127
views
Laravel 9 validation custom message title
When you validate user input like so :
$request->validate([
'ref' => 'required',
'name' => 'required'
]);
You can customize the error message for the field :
$request->validate([
...
0
votes
1
answer
23
views
Laravel Validate ->validate() method removed custom added errors?
I'm trying to use the Laravel validator to include some custom error messages before I run the validate() method. However it appears that running this method then removed any previously added errors.
...
0
votes
0
answers
47
views
ASP.NET MVC and DataTables, cannot redirect to custom error page
I have a problem when combining ASP.NET custom errors and use DataTables in a view.
If DataTables tries to get data from the server and an error occurs, first, the error is caught by ASP.NET MVC in ...
0
votes
0
answers
408
views
How to redirect to custom 403 using Middleware - asp.net
I'm trying to redirect if authentication fails to a custom 403 page which Is not working.
The web pages should only be accessible if the user is authenticated via LDAP(should belong to a particular ...
-1
votes
2
answers
76
views
VBA: How to Determine if vbObjectError Was Used?
I'm trying to create a centralized error handler. I'm using vbObjectError as recommended. But i can't figure out how to compose a conditional which can determine if my error is native or custom.
The ...
4
votes
3
answers
296
views
What numbers should be used with vbObjectError?
This page says:
"If you are generating errors, then you should add your number to the
vbObjectError constant. Eg Err.Raise Number = vbObjectError + 1000.
The range 513 - 65535 is available for ...
0
votes
1
answer
313
views
IIS 404 detailed error visible. Server files directory is exposed
I have an Angular application hosted on IIS. In my application there is a custom 404 error page for incorrect urls. However, whenever a js file is requested from the url https://mywebsite.com/assets/...
0
votes
3
answers
314
views
how to get the type of error of a Validator
I have a simple input, I would like to get the type of error at submit.
formGroup: FormGroup = this.fb.group({
password: [
'',
[Validators.required, Validators.minLength(8), ...
0
votes
0
answers
370
views
C# HTTP Error 413.1 - Request Entity Too Large - unable to gracefully handle this error
HTTP Error 413.1 - Request Entity Too Large The page was not displayed because the request entity is too large
This is a webforms app, and I have these set in web.config:
<security>
<...
0
votes
1
answer
22
views
Is this good to handle errors globally with custom error interceptor in .net core Web Api [closed]
I want to ask you guys is this good to handle errors globally or better way is to handle them with try catch blocks.
Here are 2 different ways you can handle errors:
Global handler
public class ...
0
votes
2
answers
645
views
403 Forbidden not redirected to ASP MVC 5 - Razor View custom <httperror> for IIS8
I try to redirect users that have no autorization for different pages from my app to a custom error page: CustomErr/Forbidden_403 - controller(that have a razorview). I've also configured <...
0
votes
1
answer
436
views
Runtime Error while Accessing IIS virtual directory on another server through localhost/folder
We have 2 servers, In server1, IIS configuration has a virtual directory which has the HTML page of the URL.
In server2, IIS configuration the virtual directory points to the directory in server1(same ...
1
vote
0
answers
175
views
How does redirectMode="ResponseRewrite" actually work?
EDIT
So I managed to fix it by defining an Application_Error method in my Global.asax and call Response.ClearContent from there. Not sure if this could have any undesirable side-effects though, so ...
0
votes
0
answers
78
views
Is there a way to make base exception class not print it's message
I'm writing a little program in C#, and in that program i have a base error class that inherits from the System.Exception class. Which looks as follows
// Simple Error class, used for inheriting to ...
1
vote
1
answer
212
views
IIS V10.0 in Windows 10 does not recognise anymore customErrors on web.config with 500.19 0x80070032 error
I use IIS 10 on windows 10, I was use to have web.config files with customErrors, but now it is not accepting it anymore. I been procrastinating hotfixing just removing the line from the webconfig, ...
0
votes
0
answers
236
views
format json errors in Laravel when validation fails
I'm new to Laravel. I'm trying to create an API post request. This is the validation I have.
$request->validate([
'name' => 'required',
'phone' => 'required',
'...
-1
votes
2
answers
395
views
Custom Errors in Python
class CustomError(TypeError):
def __init__(self,message,code):
super().__init__(f'ErrorCode:{code}. {message}')
raise CustomError("This is a sample error message!",500)
Okay, so I have just ...
0
votes
0
answers
46
views
Display many lines of errors messages
Hi i use alert to flash a message when a gossip was created or not. Here is my controller :
class GossipsController < ApplicationController
def index
@gossips = Gossip.all
end
def show
...
0
votes
1
answer
84
views
How to cast a variable to a particular type to convince typescript that everwhere?
For IE reasons I need to build a custom Error, however, as best as I can do it, the error has to be checked with the constructor.
customError instanceof CustomError; // false
customError.constructor =...
9
votes
3
answers
688
views
Object spread an Error results in no message property [duplicate]
I'm trying to spread an Error so that I can alter the error without affecting the original error.
const error = new Error('Error test');
const freeError = {...error};
console.log(error, ...
0
votes
1
answer
115
views
WSO2 getting custom error messages and codes
When I am getting any exception in my sequence or when I am calling any endpoint which gives me some exception, I want to set custom error messages and error codes in the exception output. I want to ...
1
vote
1
answer
1k
views
HTTP Error 500.19 - Internal Server Error (Module: CustomErrorModule, Error Code: 0x80070021)
I'm programming ASP.Net MVC 5 in VS2015. My website runs with no error from visual studio but after publishing (IIS 8.5, Windows Server 2012), this error displays.
Of course, I would point out that ...
0
votes
0
answers
141
views
Custom Error Class Extending Error With Getters
I want to create my own error class that extends the base JS Error class and has mutliple getters defined.
example:
class CustomError extends Error {
public get code(): string {
return "my-...
0
votes
1
answer
728
views
How to simulate a 500 http error on apache
I read about a lot of ideas about how to test the ErrorDocument 500 directive, but they don't work. If I put bad php code, I still get a page with my php error in it. If I create a bad htaccess file, ...
0
votes
1
answer
30
views
404 Custom errors not shown for aspx extensions
I created a 404.html page and set it in Error Documents. It works well for everything except aspx pages. How can I redirect those pages also?
Thanks
0
votes
2
answers
4k
views
How to show custom error page instead of iis 403 error page?
my web.config :
<customErrors mode="Off" redirectMode="ResponseRewrite" defaultRedirect="~/Pages/Error/DefaultError.aspx">
<error statusCode="404" redirect="~/Pages/Error/Page404.aspx"...
1
vote
0
answers
458
views
Custom error handling Angular : Throwing specific errors
I tryed to do an error handling system in Angular but there is something that doesn't work and i don't get why. When the instance of BadRequest is returned to the component, the component doesn't ...
1
vote
1
answer
169
views
What condition do I check for to raise a custom error with Net::OpenTimeout execution expired error
Open-uri and nokogiri are slow to scrape the site I want hence the Net::OpenTimeout execution expired error. I attempted to code a custom error with rescue however I do not know what condition I can ...
0
votes
1
answer
2k
views
Catching Errors with Stripe PHP
I have a custom PHP Stripe code for donations.
I am having issues with catching declined cards or a general error (such as when a user tries to load the card-processing PHP page, which should ...
3
votes
1
answer
713
views
how can I custom error message in AOP around annotations?
I want to custom error message in AOP around annotations.
I used to use @RestControllerAdvice before but It didn't work in AOP around method.
it outputs default error message.
I tried to input ...
0
votes
1
answer
115
views
Can I show detailed (debug) error messages to a few sources in ASP.Net Core?
I have a ASP.Net Core Application that is working fine in development but it is failing when deployed at the target.
I believe I know what the error is, however, I'm finding it very difficult to ...
0
votes
1
answer
2k
views
How to customize validation error message to display on tooltip in Yii2?
I am using ActiveForm of yii2 and I want to customize the validation errors. I want to display errors on tooltip.
This is my form
<?= $form = ActiveForm::begin(['id' => 'login-form','method'=...
3
votes
2
answers
5k
views
How to manage self created error message instead of using default celebrate @hapi/joi code
I have two files, one is api.js and other one is handler.js. For schema handling I am using celebrate module @hapi/joi
On api.js I wrote only the API name
On handler.js I wrote the API functionality.
...
0
votes
0
answers
38
views
Old VB.Net websites throws CutomError page after switching to another Application Pool
Foremost, I am in a strict unique environment where VS cannot be installed on the network (On server, or workstation), so I cannot debug locally or remotely via VS.
I am trying to move this website ...
0
votes
2
answers
359
views
Laravel custom error message from inside custom validator function using $validator->errors->add()
I have custom validation rule appointment_status. I am performing various test cases on it and decide what error message is best and throwback. it will be different for every case. I want the $...
0
votes
1
answer
649
views
Display custom error in error.aspx page in asp.net webforms
I want to show the Custom Errors in error.aspx page when any error occur. Its redirecting to error.aspx when error happens. But not showing the message.
I set web.config like
<customErrors mode="...
0
votes
1
answer
1k
views
HTTP errors not consistent using customErrors mode="On"
I am testing custom error handling using similar URLs http://localhost:52200/< and http://localhost:52200/<xyz. Somehow, I am getting inconsistent results.
Web.Config:
<!--MVC pipeline-->...
0
votes
1
answer
1k
views
ASP.NET MVC 5 - return special error page instead of custom error page
I am not entirely sure about the title of my question. What I need is to set up custom error pages for common errors - 404, 500, etc. but I also need my own "special" error pages for particular errors....
2
votes
2
answers
2k
views
Django: How to override unique_together error message on Admin Side?
I need some help to customize this error. Seen already on this site how can i change the error for the Model Form. My issue is that i use purely django admin side and i need to change how the error ...
0
votes
0
answers
293
views
IIS7 401 custom error page not redirecting, it just returns a 401 response
I have created a custom error page for an application proxy layer on IIS 7. The problem is it doesnt redirect when a 401 is raised.
I added it through IIS, and this is applicationHost.config snippet:...
0
votes
1
answer
515
views
CustomError not working
I use ASP.NET Boilerplate MVC template
In web.config I set
<customErrors mode="On"/>
but when an exception throw this response show in the browser
Runtime Error
Description: An ...
0
votes
2
answers
1k
views
Customize Devise Passwords error message
I've a project that implements devise and I'm having trouble overriding the Passwords controller's messages.
When a wrong email address is entered by the user, Devise by default gives
Unable to find ...
1
vote
1
answer
156
views
How to throw custom errors on some routes in c#
I get custom error if I do something like
https://localhost:xxxx/TryStuff
but if I do something like
https://localhost:xxxx/AbcController/Details/1234/TryStuff
it doesn't throw a custom error. ...
0
votes
1
answer
2k
views
CustomErrors mode="On" is not redirecting to custom error page in ASP.Net Web API 2.0
I am trying create a customError page in our Web API Project. If any unhandlled error occurred in API I need to redirect to some custom page or if route is not available then also I need to redirect ...
1
vote
0
answers
34
views
unittest for custom errors
I have three different files:
A class file lang.py that has the following function
from errors import StatusCodeError
class LangModel:
def __init__(self, localpath2fst, host="127.0.0.1", port="...
0
votes
1
answer
39
views
How can I run from exception and receive false in this case
I have this code
function checkIBAN($iban)
{
$iban = strtolower(str_replace(' ','',$iban));
$Countries = array('al'=>28,'ad'=>24,'at'=>20,'az'=>28,'bh'=>22,'be'=>16,'ba'=>...