giftless icon indicating copy to clipboard operation
giftless copied to clipboard

batch operation fails if optional hash_algo key is used

Open vali-um opened this issue 3 years ago • 1 comments

Hi,

some time ago git for windows started using the hash_algo key in their git-lfs batch requests. This leads to an unspecific error with giftless

HTTP/1.1 422 UNPROCESSABLE ENTITY
{"message": "422 Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors."}

The key is optional according to the git-lfs docs, see https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#requests

I've created a small patch to make it work but without any extra error handling if a client would request another hash algorithm. schema_hash_algo.txt

I hope someone can make use of this.

Cheers, Valentin

vali-um avatar Feb 08 '22 15:02 vali-um

This patch works with the latest pypi, thanks!

BTW this was not needed when using the latest main code.

connorjclark avatar Mar 06 '24 01:03 connorjclark