Closed Natim closed 8 years ago
You get:
{
"body": {
"code": 400,
"errno": 999,
"error": "Bad Request",
"message": "Failed batch subrequest"
}
}
While you should get:
{
"code": 400,
"details": [
{
"description": "Invalid value for If-None-Match",
"location": "headers",
"name": null
}
],
"errno": 107,
"error": "Invalid parameters",
"message": "headers: Invalid value for If-None-Match"
}
To reproduce call:
BID_AUDIENCE=https://token.services.mozilla.com/ BID_WITH_CLIENT_STATE=True \
http POST http://localhost:8000/v1/batch @~/batchsyncto.json \
--auth-type fxa-browserid --auth syncto@trunat.fr
Here is the example JSON file:
{
"requests": [
{
"method": "PUT",
"headers": {
"If-None-Match": "'*'"
},
"path": "/v1/buckets/default/collections/history/records/zpbhM1shjTMx",
"body": {
"data": {
"id": "zpbhM1shjTMx",
"payload": "{\"hmac\":\"3cc8fd6a3cf588eeb6921fcf572522406b69d1713be783c6b8c2b9ad69ae8316\",\"ciphertext\":\"tgdRbb4EO2Pkv3XvTIkxiqR6/QSCKMfYfqLfcIV3gcklP16Jd2PAcRIhAeqCJk1HlXLhv9ZbkTRp6B7Db3g/JlfJpvrOG+ooE9sIpSqNJ7hprHu7LBEBphy5KMsaHp1LVE2dx533ssIv39gtvdfLyPMtj+pbanu/cdLWm7Ii15dfk6OU00mGRUvIKDbYbfQs5gUHpZpfqLpNUnbDDAj/2g==\",\"IV\":\"3DjnTHj94GlG6CE8VJBLaA==\"}"
}
}
}
]
}
If you try sending:
With a wrong If-None-Match header, then the 400 error details will not be send upper