Questions tagged [http-status-code-412]

HTTP Status Code 412 Precondition Failed occurs when the client sends a precondition to serving the content (such as an If-Match header) that does not meet expectations.

27 questions
1
vote
2 answers

Is it OK to return most recent version of the entity in case of a 412 "Precondition failed"

When doing a PUT or DELETE with an "If-Match" header, in case the ETag sent by a client indicates staleness, rather than just returning a 412, I'd like to return the whole up-to-date entity (including its new ETag in the HTTP header), so the client…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
1
vote
1 answer

Which HTTP Status code should indicate failed pre-conditions?

I have a GET /reports endpoint which is having pre-condition - list of particular forms should be filled before we fetch data for reports. In case any of those forms are not filled, an error should be sent to the client saying "X form should be…
1
vote
1 answer

Permissions denied when using offline access for google SA360 API in google script

I am trying to use the doubleclick-search (SearchAds360) api in Google Script. I have generated a refresh token using another application, and have a workflow that exchanges the refresh token for an access token in google script with no issue. When…
1
vote
0 answers

412 precondition failed no response

Hi I'm trying to retrieve the json response from my API but I'm having problem if the status code is 412. It just keeps on loading and no response is being returned. But if I change the code to 400 it returns the output successfully. Any reason for…
MadzQuestioning
  • 3,341
  • 8
  • 45
  • 76
1
vote
0 answers

412 (precondition failed) in Django

I have this API endpoint which signs up a user and is used by mobile apps: /mobile/v1/signup I recently migrated the app from Django 1.7 to Django 1.10. After this I started to get this strange error. If this API accessed the second time, it is…
Jahongir Rahmonov
  • 13,083
  • 10
  • 47
  • 91
1
vote
3 answers

My CORS rule doesn't fix my CORS error

I have some CORS rules on my S3 bucket. This is what it looks like:
marcamillion
  • 32,933
  • 55
  • 189
  • 380
0
votes
0 answers

What is the best way to handle 412 pre-condition failed errors?

In my solution there are 2 separate pipelines handle the incoming requests, one to handle the user request and another handles the file uploads. There are chances of 2 concurrent requests may act on the same cosmos db documents. To overcome the…
0
votes
1 answer

304 response from a non modifying POST request

I am working on a POST HTTP API which does not modify or create any state on the server. The API is implemented with method POST as it needs to accept multiple complex inputs which would not be possible using query parameters. What is the correct…
Sumit Jain
  • 1,484
  • 2
  • 25
  • 44
0
votes
1 answer

Bot-Builder python State Storage in DocDB: 412 Data Store pre-condition not met?

I have a serverless backend on AWS lambda that hosts an MS Teams bot. The state of this bot is stored in CosmosDB. I'm now having issues when I trigger my bot multiple times. I already opened a ticket on GitHub but not sure if this should be seen as…
rvwsd
  • 97
  • 11
0
votes
0 answers

Generating ETag in GET response Header Java spring To solve 412 http error

I am using some external API to GET and POST some ressources, locally my code works fine with the call of different endPoints (GET, POST...) and even with Postman, but when i try to run my code in another platerform (where the ressources are), i get…
Im091
  • 11
  • 2
0
votes
2 answers

HTTP conditional requests

How to implement conditional request with custom condition that checks order status? Example: User would sent GET /api/order with header "x-if-ready-for-payment": true. If order is ready for payment, response will be order and status code 200. If…
djoloho
  • 39
  • 5
0
votes
2 answers

PHP CURL 412 error

I'm triying to register on a website using PHP CURL. Everything is okay, but when I execute my code I get an error from the host: HTTP/1.1 412 Precondition Failed Date: Mon, 15 Feb 2016 20:54:58 GMT Server: Varnish X-Varnish:…
user5672329
1
2