| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| if err != nil { | ||
| return errors.Wrap(err, "Error opening release asset.") | ||
| } | ||
| defer assetFile.Close() |
There was a problem hiding this comment.
I think defering inside a for loop might cause a resource leak here? If so, you might have to move this block into a function.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, although I've not tested it out. 🙏
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This hopefully improves the success rate of uploading to the integration test instance.
We retry on 5xx errors, and handle already_exists errors explicitly. The reason for handling `already_exists is that it seems like sometimes the "failed upload" from a 5xx error will actually finish successfully in the background so if we retry again we'll get a 422 due to uploading a duplicate asset.