Questions tagged [bad-request]

HTTP status code 400, implying the request was not understood by the server and should not be redone without modifications.

641 questions
12
votes
3 answers

Facebook graph api returns 400 bad request with correct access token

I just manually implemented a facebook oauth2 flow into my webapp. After receiving the correct access_token and trying to call the graph api for user data I got a 400 BAD REQUEST as response. GET…
heiningair
  • 441
  • 1
  • 6
  • 23
10
votes
1 answer

Bad Request Error with flask, python, HTML, unusual initialization behavior with flask.request.form

I'm writing a web-app using flask, python and HTML. My issue is that the first time I load the a webpage, I get the following error Bad Request The browser (or proxy) sent a request that this server could not understand. I'm able to get the…
erin
  • 1,130
  • 3
  • 17
  • 28
9
votes
1 answer

PHP: Malformed header

Could someone explain what is wrong with this PHP code? (PHP Version 5.3.5)
Svish
  • 152,914
  • 173
  • 462
  • 620
9
votes
1 answer

ASP.NET MVC 400 Bad Request with URL restricted characters such as %

I'm developing an ASP.NET MVC 3 blog application using VS10 and its asp.net development server, and today I encountered the "HTTP Error 400 - Bad Request" error when I request on a blog post with a slug that has these chars "doesn%25e2%2580%2599t"…
Ray
  • 12,101
  • 27
  • 95
  • 137
9
votes
2 answers

Telegram Bot API: getChatMember throws USER_ID_INVALID for valid user

I'm trying to find out if a specific User is present in a supergroup, in order to keep track of those who left. For that, I'm calling the Bot API method getChatMember for each User and checking if their status is either Left or Kicked. However, I…
Axel Magagnini
  • 855
  • 1
  • 8
  • 19
9
votes
3 answers

Instagram oAuth returning "No matching code found" on one server

I'm currently receiving {"code": 400, "error_type": "OAuthException", "error_message": "No matching code found."} while attempting to get a user's access token on one of our servers. This is occurring while using the REST Client Chrome extension…
Richard Mosley
  • 111
  • 1
  • 6
9
votes
2 answers

C# WebRequest.getResponse(): 400 Bad Request

I am trying to download a file from a server using System.Web. It actually works, but some links give me trouble. The links look like…
Pasukaru
  • 1,050
  • 1
  • 10
  • 22
8
votes
1 answer

C# HttpListener 'Bad request' problem

For some reason when request is sent to HttpListener via non-standart address it returns

Bad Request (Invalid Hostname)

Example packet: GET /index HTTP/1.1 Host: ::ffff:88.118.32.126:2548 Accept: */* HTTP/1.1 400 Bad…
Semas
  • 869
  • 10
  • 22
7
votes
0 answers

How to protect against http/0.9 evasion request? [flask]

I've been getting some weird http requests on my AWS server. I run a python3/flask v0.12 web server on it. Does anyone know if I should be worried about the requests below? Is there anyway to automatically reject old http requests (e.g. http/0.8…
7
votes
2 answers

Add message to context.result

I'm creating a DataAnnotation that if not successful will return a BadRequest. context.Result = new BadRequestResult(); That works fine. I want to include a message along with this, but BadRequestResult doesn't appear to take any message params? Is…
thegunner
  • 6,883
  • 30
  • 94
  • 143
7
votes
1 answer

POST on GraphQL returns 400 BAD REQUEST

I want to POST a mutation that updates field "name" which is JSONString. When I do that, I got a response - 400 BAD REQUEST, but when I try other mutation (with the field type of String) it goes smooth and the result is exactly what I want. function…
Shenloc
  • 71
  • 1
  • 1
  • 4
7
votes
1 answer

How to return JSON object when Bad Request MVC

I am working on MVC 4 project. I have a Action which executed when Ajax Post request is done. In some case, which I could exactly determine, I have to set the Status property of the Response object to HttpBadRequest value, AND return JSON object…
Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
7
votes
2 answers

yii2 - How to solve Bad Request (#400) Unable to verify your data submission?

I have a controller generated by Gii. I modify the behaviors to be like this: public function behaviors() { return [ 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' =>…
Wilianto Indrawan
  • 2,394
  • 3
  • 21
  • 26
7
votes
5 answers

AOP @Around: return BAD_REQUEST response

In a Spring rest application, every single URL must start with an application id (appId). This appId must be validated in every single rest service. Instead of duplicating code, I tried to create an @Aspect with an @Around advice. This is correctly…
zip4ever
  • 121
  • 1
  • 7
6
votes
6 answers

AxiosError : Request failed with status code 400 (in React JS)

I am trying to post comments using axios. When I submit my datas entered in the form, I see this error in the console : AxiosError {message: 'Request failed with status code 400', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request:…
Emilie Tossan
  • 127
  • 1
  • 1
  • 16
1
2
3
42 43