Questions tagged [httpexception]

HttpException or HTTPException are exception classes defined by various object oriented libraries that signal a problem during processing of a http request.

There is a HttpException in the System.Web namespace of .Net, another one in Apache Commons and a HTTPException in JAX-WS

160 questions
7
votes
1 answer

Any Progress on Diagnosing “Request timed out” HttpExceptions?

I am having the same issue as described in this post, Diagnosing "Request timed out" HttpExceptions. I've turned on Failed Request Tracing as recommended and am working with someone at MS (although it's painfully slow). The original post hasn't…
Dr. Hilarius
  • 1,134
  • 1
  • 14
  • 20
7
votes
2 answers

Get path variable out of HttpMessageNotReadable exception

We have some web services which are being consumed by mobile clients , in which the mobile clients make some request's and we return response to them. Somehow if the client make any invalid request we throw Custom Exceptions .But recently the mobile…
Anand Kadhi
  • 1,790
  • 4
  • 27
  • 40
7
votes
2 answers

UrlFetchApp muteHttpException doesn't work

How to handle urlfetch error? I'am trying muteHttpExceptions: true, but it doesn't work and the script breaks. function myFunction() { var result = UrlFetchApp.fetch("http://www.soccer-wallpapers.net/soccer_wallpaper/barcelona_fc_barcelona_360.jpg…
Meta Morfoself
  • 103
  • 1
  • 2
  • 9
6
votes
2 answers

Custom abort mapping/exceptions in Flask

The default message for Flask 400 exception (abort()) is: { "message": "The browser (or proxy) sent a request that this server could not understand." } For 404: { "message": "The requested URL was not found on the server. If you entered the…
wswld
  • 1,218
  • 15
  • 32
6
votes
1 answer

Throw http exception (Unauthorized) from Application_Error

I am trying to throw this row from Global asax Application_Error throw new HttpException((int)HttpStatusCode.Unauthorized, "Forbidden"); But for some reason I am getting 200 and not 401 in the browser, do you know why? Update: protected void…
SexyMF
  • 10,657
  • 33
  • 102
  • 206
5
votes
3 answers

Flutter application throws Http Exception and instantly crashes

currently I'm having a problem with running flutter applications. I tried to search solutions, but none of them was actually my case. The problem is, when I try to install an application, sometimes it starts running, but instantly crashes, or not…
Patrick Visi
  • 100
  • 1
  • 7
4
votes
2 answers

NestJS Exception filter messes up error array if it comes from ValidationPipe

So I use the ValidationPipe to validate my DTOs in NestJS, like this: // auth.dto.ts export class AuthDto { @IsEmail() @IsNotEmpty() email: string; } Without the Exception filter the error message works as intended. I leave the email field…
jstmrby
  • 133
  • 1
  • 9
4
votes
0 answers

Correct way to handle custom API error messages in Requests?

I'm using the Python Requests library to call an API that may return custom error messages in it's JSON response, i.e. something like this: { "error": "TOKEN INVALID" } I would like to have a custom exception class with this error message as…
gmolau
  • 2,815
  • 1
  • 22
  • 45
4
votes
1 answer

Why do I get an HttpException from VirtualPathUtility ToAbsolute with some paths?

I'm trying to use VirtualPathUtility.ToAbsolute to resolve app-relative paths, such as ~/MyPage.aspx, to application-absolute paths, such as /MySite/MyApp/MyPage.aspx. However, with some paths, I receive an HttpException saying that my path is "not…
AakashM
  • 62,551
  • 17
  • 151
  • 186
4
votes
3 answers

Rendering a view to a string in MVC, then redirecting -- workarounds?

I can't render a view to a string and then redirect, despite this answer from Feb (after version 1.0, I think) that claims it's possible. I thought I was doing something wrong, and then I read this answer from Haack in July that claims it's not…
James S
  • 3,355
  • 23
  • 25
4
votes
1 answer

Windows Auth Server cannot set status after HTTP headers have been sent

I have C# n-layer application. Normaly we use Forms authentication and everything works fine, but when we tried to set authentication on Windows, it started to throw following exception in some occassions (mostly in administration, for exaple when…
4
votes
1 answer

Good idea to catch HttpException?

I have the following error in my output.aspx page sometimes: Exception Details: System.Web.HttpException: Request timed out. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding…
cdub
  • 24,555
  • 57
  • 174
  • 303
3
votes
4 answers

How to register custom exception handler in laravel 8

In Laravel 7 this code works fine. Using renderable method also works in laravel 8. But I'm not sure how to register it in laravel 8 after creating a CustomException class. public function render($request, Exception $exception) { if…
Sarwar Ahmed
  • 588
  • 2
  • 6
  • 14
3
votes
1 answer

Is there anywhere in the ASP.NET page lifecycle before "A potentially dangerous Request.Path value was detected from the client" is thrown

I would like to be able to do some checks on an incoming request before the HttpException "A potentially dangerous Request.Path value was detected from the client" is thrown. Is there anywhere in the ASP.NET lifecycle I can do this? This is on an…
Rick
  • 1,863
  • 2
  • 19
  • 46
3
votes
3 answers

Server cannot modify cookies after HTTP headers have been sent

I am creating a web application in C#. When my page loads I fire an asynchronous thread to process some data. Part of this processing is the updating of a cookie. However when I save the cookie to the response by…
amateur
  • 43,371
  • 65
  • 192
  • 320
1
2
3
10 11