Questions tagged [custom-errors]
CustomErrors is a mechanism used to provide custom error pages in ASP.NET based web applications.
324
questions
1
vote
0
answers
46
views
Why is call reverting when decoding custom error
I have a contract that calls another contract using a try-catch, which reverts with a custom error. I am decoding the error reason bytes using abi.decode, but it is reverting when I try to decode.
...
0
votes
1
answer
146
views
NestJS ValidationPipe with stopAtFirstError: true doesn't respect the order of decorators in class-validator
I'm using NestJS with class-validator to validate incoming requests. In my SignUpDto class, I have applied validation decorators like IsNotEmpty, IsString, and IsEmail to validate the email and ...
0
votes
1
answer
82
views
Is there a way to apply a Query Calculation Column in Cognos that determines 'real' (Built) from 'interim' (Not Built) regarding VINs
After downloading the intended report out of Cognos, in Excel I use the following formula as a column to inform if the VIN is built or unbuilt.
The formula I use in excel:
When I inputted this as a ...
1
vote
0
answers
557
views
SpringBoot @DateTimeFormat and custom error message via MessageSource
I'm trying to avoid return this kind of error to the client when the Spring fails to convert a date using @DateTimeFormat
Failed to convert property value of type 'java.lang.String' to
required type '...
0
votes
1
answer
537
views
Creating a custom validation error message in CodeIgniter4
How can i create a custom error message for a custom validation. I'm using codeIgniter4
Okay guys so I'm a bit of a newbie with CI4 and I have created a custom validation file using the spark command ...
2
votes
2
answers
2k
views
How to return a custom error from Fastify v3?
as you know the default error interface in Fastify looks like
{
"statusCode": 400,
"error": "Bad Request",
"message": "Missing property blah-...
0
votes
2
answers
71
views
How can I trigger errors on webpages so I can take a screen capture for visual display?
I want to be able to "make" browser display errors, like forbidden, 503 etc...
Is there some kind of sandbox where I could do this?
I need the errors to be rendered in google chrome, then ...
0
votes
1
answer
846
views
Change the default error message in the model state binder - not working
This (in ASP.NET Core 3.1) is how my property looks like in the class:
[BindProperty]
[Required(ErrorMessage = "Enter the valid amount")]
[ValidDecimal(ErrorMessage = "Enter the amount ...
0
votes
1
answer
179
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
256
views
What is the relation between CustomErrors web.config setting and azure app insights logging?
Link: https://learn.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 ...
1
vote
2
answers
634
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([
...
1
vote
1
answer
272
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.
...
1
vote
0
answers
2k
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
119
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 ...
5
votes
3
answers
936
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
965
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/...
1
vote
3
answers
2k
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
545
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
23
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
683
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
918
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
342
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
163
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
432
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
311
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
914
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
105
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
295
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 =...
13
votes
3
answers
1k
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
228
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
2k
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
241
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
1k
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
65
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
6k
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
895
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
197
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 ...
1
vote
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
898
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
402
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'=...
4
votes
2
answers
6k
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
47
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
435
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
758
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
2k
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
351
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
596
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 ...