Bug
downloadClientFromRelease() and downloadTypesFromRelease() in downloader.js don't check the HTTP status code before writing to file.
If the server returns 404 or any other error, the response body (usually an HTML error page) gets written to the client/types file and the function still resolves as success.
downloadBinariesFromRelease() in the same file already handles this correctly with a status check and .on('error') handler. These two functions should behave the same way.
Fix
Add status code check and .on('error') handler to both downloadClientFromRelease() and downloadTypesFromRelease().
Bug
downloadClientFromRelease() and downloadTypesFromRelease() in downloader.js don't check the HTTP status code before writing to file.
If the server returns 404 or any other error, the response body (usually an HTML error page) gets written to the client/types file and the function still resolves as success.
downloadBinariesFromRelease() in the same file already handles this correctly with a status check and .on('error') handler. These two functions should behave the same way.
Fix
Add status code check and .on('error') handler to both downloadClientFromRelease() and downloadTypesFromRelease().