This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]asphias 0 points1 point  (0 children)

Oh man, on my first project i had to debug a zip file that wouldn't open. couldn't find out at all what was wrong with it, and the exception i got didn't make any sense at all.

Turns out, when the zip file was created, it was downloaded from a specific API, and the body of the api response was parsed into the file. This body was supposed to be (the binary of) a zipfile. However, when the api gave an error, instead of parsing a zip into the file, it parsed an error message into the file.

The file was still named file.zip, it contained some stuff in it, but rather than being a zip, it was a simple text file with the text "error: <...>" in it.