Questions tagged [http-error]

An error code as a result of an HTTP request.

In the HTTP protocol each request returns a result code, also sometimes called HTTP error code. The code is a numeric value describing the result of the requested operation.

Examples:
200 OK, the request was executed without errors.
404 File not found, the requested file couldn't be found.

See the full list here.

650 questions
430
votes
48 answers

HTTP Error 503, the service is unavailable

I'm really new to setting up web servers in general. I've got IIS 8 on Windows 8, and I'm trying to set up a little site locally, while doing some development. In IIS I choose Add Site, give a name, points to a location where I have a index.html…
Andreas
  • 5,081
  • 2
  • 17
  • 23
419
votes
12 answers

How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String?

I'm using Spring MVC for a simple JSON API, with @ResponseBody based approach like the following. (I already have a service layer producing JSON directly.) @RequestMapping(value = "/matches/{matchId}", produces =…
Jonik
  • 74,291
  • 66
  • 249
  • 356
129
votes
47 answers

HTTP Error 500.30 - ANCM In-Process Start Failure

I was experimenting with a new feature that comes with .net core sdk 2.2 that is supposedly meant to improve performance by around 400%. Impressive so I tried it out on my ABP (ASP.NET Boilerplate) project Template asp.net core mvc 4.0.2.0 I added…
Jazb
  • 4,332
  • 6
  • 29
  • 34
89
votes
3 answers

Rest error message in HTTP Header or Response Body?

I have a REST service that is exposed to iPhone and Android clients. Currently I follow the HTTP codes 200, 400, 401, 403, 404, 409, 500 etc. My question is where is the recommended place to put the reason/description/cause of the error? Does it…
James Cowhen
  • 2,697
  • 3
  • 21
  • 32
72
votes
3 answers

Overriding urllib2.HTTPError or urllib.error.HTTPError and reading response HTML anyway

I receive a 'HTTP Error 500: Internal Server Error' response, but I still want to read the data inside the error HTML. With Python 2.6, I normally fetch a page using: import urllib2 url = "http://google.com" data = urllib2.urlopen(url) data =…
backus
  • 3,327
  • 5
  • 25
  • 29
59
votes
4 answers

how to get access to error message from abort command when using custom error handler

Using a python flask server, I want to be able to throw an http error response with the abort command and use a custom response string and a custom message in the body @app.errorhandler(400) def custom400(error): response = jsonify({'message':…
richmb
  • 1,235
  • 2
  • 13
  • 18
48
votes
6 answers

Global error handler for any exception

Is there a way to add a global catch-all error handler in which I can change the response to a generic JSON response? I can't use the got_request_exception signal, as it is not allowed to modify the response…
joscarsson
  • 4,631
  • 4
  • 33
  • 41
26
votes
1 answer

Need response body of HTTP 500 with file_get_contents (PHP)

Using file_get_contents as part of custom SOAP implementation to apply SOAP calls (ALL libraries that we tried would not do SSL + certificate based authentication with SOAP 1.2 correctly). However difficult and barely-documented API often returns…
frEEk
  • 263
  • 1
  • 3
  • 4
25
votes
3 answers

Instagram/feed API media URL shows 'URL signature expired'

I am using Instagram feed API to show my Instagram posts on my Website. But some video URL shows 'URL signature expired'. Any solution for me ?
23
votes
5 answers

urllib2 HTTP Error 400: Bad Request

I have a piece of code like this host = 'http://www.bing.com/search?q=%s&go=&qs=n&sk=&sc=8-13&first=%s' % (query, page) req = urllib2.Request(host) req.add_header('User-Agent', User_Agent) response = urllib2.urlopen(req) and when I input a query…
PyFan
  • 241
  • 1
  • 2
  • 5
23
votes
4 answers

How do I display custom error pages in Asp.Net Mvc 3?

I want all 401 errors to be be redirected to a custom error page. I have initially setup the following entry in my web.config.
23
votes
2 answers

Trigger a HTTP error in Rails

I'm trying to call a custom instance of a 403 HTTP error in Rails but I can't seem to figure out how to do this... I have several user authentication roles and basically if a role tries to browse to an area that it is not authorised to visit I want…
Ganesh Shankar
  • 4,676
  • 8
  • 39
  • 56
22
votes
4 answers

Understanding “408 Request Timeout” on Apache with PHP

Issue description - Apache logs I found items similar to this one in the Apache log file: 166.147.68.243 [24/Feb/2013:06:06:25 -0500] 19 web-site.com "-" 408 - "-" I’ve got custom log format and 408 here stands for status. The log format…
Victor Smirnov
  • 2,693
  • 4
  • 23
  • 43
21
votes
8 answers

How to send Laravel error responses as JSON

Im just move to laravel 5 and im receiving errors from laravel in HTML page. Something like this: Sorry, the page you are looking for could not be found. 1/1 NotFoundHttpException in Application.php line 756: Persona no existe in Application.php…
Andres
  • 353
  • 1
  • 3
  • 8
21
votes
3 answers

REST-API, proper HTTP status code for invalid DELETE

I'm designing a RESTful API that is using the HTTP status codes and verbs as key components in communicating. On the religious level it's on the zealot side of RESTafarian. Rule of thumb for deciding HTTP status codes has been this graph, or similar…
Cleric
  • 2,911
  • 3
  • 19
  • 24
1
2 3
43 44