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
1
vote
3 answers

System.Web.HttpException: Unable to validate data - after publishing site

I have written the following code for login: Session["IsLogin"] = false; System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); if (txtPassword.Text.Trim() ==…
Chris
  • 2,293
  • 11
  • 48
  • 86
1
vote
1 answer

HttpException when deleting session storage after logout

I'm experiencing a bug where if I log out and then delete the session from the framework storage, it is throwing the following: "message": "", "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException", "file":…
kjdion84
  • 9,552
  • 8
  • 60
  • 87
1
vote
1 answer

exception message for missing @RequestBody method parameter

Firstly,if you have any ideas or solution, thank you to present here. I use @RequestBody on one of my controllers for a required parameter, I need some useful way of saying which parameter was missing if it's not there. When there are some…
xiao
  • 542
  • 1
  • 9
  • 16
1
vote
4 answers

exceptions handling error scenario

I have the following scenario: Class C{ mainCall(){ try{ //do something; }catch(MyException e) //doSomethingElse; } } Class A{ methodOne() throws myException{ b.callMethodTwo(); } } class B{ callMethodTwo() throws myException{ …
user123475
  • 1,065
  • 4
  • 17
  • 29
1
vote
1 answer

How do I test whether an HttpException is a "The client disconnected." error?

I would like to test whether an HttpException is a disconnected error. A naive implementation would check the message: bool IsClientDisconnectedError(HttpException exception) { return exception.Message == "The client disconnected."; } How can I…
joshuanapoli
  • 2,509
  • 3
  • 25
  • 34
1
vote
1 answer

Catching HTTPerror in python3 from stravalib function

My code (for the relevant part) is as follows myactivities = [] from urllib.error import HTTPError for activity in client.get_activities(after = activities_from, before=activities_to): print(activity) print(activity.id, activity.start_date) …
1
vote
5 answers

Display Yii2 HttpException Message in View

I try to handle HttpExceptions in Yii2 to Display Errormessages for Webusers. I Set everything up like here: http://www.yiiframework.com/doc-2.0/guide-runtime-handling-errors.html Controller namespace app\controllers; use Yii; use…
kasoft
  • 456
  • 6
  • 19
1
vote
1 answer

MethodNotAllowedHttpException Laravel 5.3

I couldn't update or delete, especially when i add Route::resource(....) in route file web.php (route file) Route::resource('home/activity','ActivityController'); edit.blade.php {!!Form::model($activity,['action' =>…
itsmed
  • 100
  • 1
  • 9
1
vote
1 answer

Laravel, how to get controller instance or classname in handle() inside App\Exceptions\Handler.php

I have looked around and don't seem to find an answer or discussion regarding on this. Is it possible to obtain the original controller's instance inside the "handle()" method in App\Exceptions\Handler.php? I would like to know how to do this in…
Thomas Cheng
  • 695
  • 12
  • 26
1
vote
0 answers

FitNesse Tests stopped working because of malformed request string

I am setting up FitNesse Acceptance tests for a SignalR hub application. The tests were executing and succeeding earlier this week. Now I am getting an exception in the FitNesse execution window: WARNING: An error occured while fulfilling user…
tobre
  • 1,347
  • 3
  • 21
  • 53
1
vote
0 answers

Correct HTTP error code for MediaTypeFormatter failure

We have written a custom media type formatter. When we find that we cannot deserialise the input then we want to throw an error. I'd like to return an HTTP error code to the user that was making the PUT/POST request, but I am not sure what is the…
ShaunP
  • 463
  • 1
  • 5
  • 20
1
vote
1 answer

Catch HTTPException within Snap Handler

Within one of my snap handlers I am calling an external resource over HTTP using http-client, which can throw an HttpException. In the simplest case, I just want to catch the error and write to std out while I debug; however, I am having a tough…
Neil
  • 345
  • 1
  • 11
1
vote
2 answers

Use HtmlUnit to Launch Application on Client Machine

I'm trying to launch an application by clicking a button on a webpage using HtmlUnit. The url contains a protocol which HttpClient doesn't support. The protocol makes it so when you click the link, it will launch an application on your machine by…
Jaylynn
  • 11
  • 1
1
vote
1 answer

PhpStorm autocompletes with classes that do not actually exist

I use PhpStorm 9.0.1. When I write to throw a new Exception PhpStorm is showing for Exceptions the HttpException class. So I can autocomplete my code and have the following line: throw new HttpException($message); But when I execute the code it…
gmponos
  • 2,157
  • 4
  • 22
  • 33
1
vote
1 answer

Python/Pyramid - Wrapping Cornice response with extra data when raising HTTP Exception

I'm using Pyramid and Cornice to write some RESTful Python app and I made a simple Cornice resource: @resource(collection_path='/users/', path='/users/{id}') class UsersResource(object): def __init__(self, request): self.request =…
errata
  • 5,695
  • 10
  • 54
  • 99