Skip to content

Conversation

@mbway
Copy link

@mbway mbway commented Sep 11, 2025

Breaking change

Proposed change

My container was exiting with the error message:

Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/nordvpn/xxxx.nordvpn.com.ovpn:1: html
Use --help for more information.
exit code: 1

and after some debugging it turned out that the server URL I was passing was no longer valid and so the download ovpn file is not a valid configuration but instead a 404 HTML page.

This PR passes the --fail argument to curl which makes the error more informative in this case. For example when downloading an invalid server (uk0000):

$ curl -sSL --fail https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/uk000.nordvpn.com.udp.ovpn -o foo
curl: (22) The requested URL returned error: 404

Note: I only added the flag to the command to download from nordvpn but I think it would make sense to use --fail everywhere. I can make this change if you want.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to this container)
  • Breaking change (fix/feature causing existing functionality to break)

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated

Without --fail, the resulting file is not a valid ovpn configuration
and so will fail later anyway, but with a less informative message.
Copy link
Contributor

@ilike2burnthing ilike2burnthing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also used here:

curl -sSL --fail -o "${config_repo_temp_zip_file}" "${GITHUB_CONFIG_BUNDLE_URL}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants