i spent a few days thinking "how am i gonna handle this weird edge case" and eventually i realised "throw a better error message" was the right answer
on the plus side i got to replace the caveat in the readme with a "it only breaks if you put garbage in" note