Questions tagged [custom-errors]
CustomErrors is a mechanism used to provide custom error pages in ASP.NET based web applications.
311
questions
0
votes
2answers
34 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
0answers
25 views
How can I customize 400 error message on my API? [duplicate]
When I try to generate 400 error on purpose by GET request:
https://localhost:44347/api/tests/2?pageSize=10'"()%26%25<acx><ScRiPt%20>xrr4(9975)</ScRiPt>
For method like that:
...
0
votes
1answer
108 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
0answers
55 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
0answers
33 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 ...
0
votes
0answers
120 views
Custom credential provider is ignored as part of logon procedure
My tasks is to enhance the password policy mechanism of the GPMC and support changing error messages shown to domain users when changing their password based on some internal logic.
I implemented the ...
1
vote
1answer
28 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
0answers
32 views
Exception handling in Oracle Apex Data load Wizard
I want to show meaning full error message to user instead of Showing Oracle's ORA-01400 for failed record from data load wizard of Oracle apex.
Any solution for this
0
votes
0answers
72 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
2answers
137 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
0answers
28 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
1answer
34 views
How would you report the issue, where customer reports a defect in Production but you cannot reproduce it consistently?
What are the guidelines or best practices to follow for a tester in below scenario:
As a tester what is the correct way to report the issue, where customer reports a defect in Production but you ...
0
votes
1answer
61 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 =...
3
votes
3answers
200 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
1answer
63 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
1answer
864 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
0answers
32 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
1answer
392 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
1answer
19 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
2answers
2k 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
0answers
134 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
1answer
92 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
1answer
874 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
1answer
396 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
1answer
43 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
1answer
916 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'=...
1
vote
2answers
2k 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
0answers
33 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
2answers
193 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
1answer
496 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
1answer
649 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
1answer
532 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
2answers
1k 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
0answers
180 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
1answer
417 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
2answers
746 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
1answer
65 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
1answer
1k 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
0answers
25 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
1answer
27 views
How can I run from exception and recieve false in this case
Good day 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'=>...
0
votes
0answers
419 views
Turning off custom errors in Windows Service
I have a Windows Service that uses .NET Remoting (yes I know remoting has been replaced by WCF but this is a legacy application).
When I run the service I get this:
Exception Type: System.Runtime....
1
vote
1answer
50 views
Python 3.6: Using object instance name for raising errors
I'm attempting to create a 3-d graphics engine using Python 3.6, Tkinter, and specifically NOT pygame (or any other 3d graphics engines) as part of a university assignment.
Within this project, I ...
2
votes
1answer
465 views
How to represent Get error type using a switch statement?
How to represent the following using a switch statement?
if (e instanceof EvalError) {
console.log(e.name + ': ' + e.message);
} else if (e instanceof RangeError) {
console.log(e.name + ': ' ...
1
vote
0answers
113 views
Central Error Page “Web Service” (External Custom Error Pages)
GOAL SUMMARY:
I would like to create an application that will render custom error pages for other intranet applications. The goal is to centralize the content of these pages so that it may be managed ...
1
vote
0answers
31 views
Handle custom errors with all http verbs in mvc5
Hi I am developing web application in mvc5. I am handling errors using custom errors and the code snippet I have in my web.config is given below:
<customErrors defaultRedirect="~/Login/Error/" ...
12
votes
1answer
173 views
Add extra properties in Custom Exception to return to AJAX function
I have a custom exception class as follows:
<Serializable>
Public Class SamException
Inherits Exception
Public Sub New()
' Add other code for custom properties here.
End Sub
...
1
vote
0answers
447 views
Custom error page only works for 404 errors
I have developed an MVC5 page and have this in web.config:
<customErrors mode="On" defaultRedirect="/Home/Error" />
the problem is that this only works when I enter a non existing file in URL, ...
2
votes
1answer
389 views
Making/forcing the Validation to fail by adding custom error Not Working in Laravel
I am trying to make the Validation fail. I have tried the following:
UserController.php
public function add_user(Request $request)
{
$messsages = array(
'email.unique' => 'Email already ...
0
votes
3answers
2k views
Resource not found errors in Ruby on rails
I'm very new to RoR, I know that ActiveRecord::RecordNotFound can be mapped to http 404 error. Is there any other resource in ruby on rails whose non-existence will raise something like
ResourceName::...
1
vote
0answers
89 views
Forget Email not send the email to customer in magento 1 but in code the mailer function sent the email
I am facing a issues with forget password issues the in magneto 1.9 .i am using the default forget password Transactional email template . i have also debug the code there in core file the mailer ...