Categories
General

“Unprocessable Entity” is not valid header name

As of March 20th 2022, https://github.com/GrahamCampbell updated the following library guzzlehttp/psr7

so in your unit test you will see errors as follow

InvalidArgumentException: "Unprocessable Entity" is not valid header name
InvalidArgumentException: "409 conflict with the current state of the target resource" is not valid header name
InvalidArgumentException: "Not Found" is not valid header name
InvalidArgumentException: "Not Acceptable" is not valid header name
InvalidArgumentException: "Not Found" is not valid header name
InvalidArgumentException: "Bad Request" is not valid header name
InvalidArgumentException: "409 conflict with the current state of the target resource" is not valid header name
InvalidArgumentException: "500 Internal Server Error" is not valid header name

The version 1.8.5 was breaking our set of unit test

Solution is to update composer.json and use this version below

"guzzlehttp/psr7": "1.8.3",

2.1.1 – 2022-03-20

Fixed

  • Validate header values properly

https://github.com/guzzle/psr7/blob/2.2.1/CHANGELOG.md

Leave a Reply