I'm working with Install4j and using its "Download file" action to download files via HTTP. However, I've encountered an issue when the file to be downloaded is not available, resulting in HTTP error codes like 404 (Not Found) or 403 (Forbidden). In these scenarios, instead of properly handling the error, the action downloads and saves the HTML error page to the designated file location, disregarding the actual HTTP status code. My observation is that the action seems to only explicitly handle redirection status codes, specifically 301 (Moved Permanently) and 302 (Found).
My question is: Is there a way to configure or extend the action to enhance its error management? I want to avoid downloading the error page content and instead handle errors more gracefully within my installer.
Any insights, workarounds, or suggestions on how to address this issue would be greatly appreciated! Thanks in advance.