You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With CLOUDFLAREAPI, even if an invalid API token is used and preview ends with "ERROR", the exit code is 0.
That's especially confusing when using in a pipeline.
The output is "ERROR: ERROR: failed fetching domain list from cloudflare(""): Invalid access token (9109)Done. 0 corrections." but the exit code is 0.
Same issue happens if you forget to whitelist your IP on CloudFlare and attempt to connect there. The output is "ERROR: ERROR: failed fetching domain list from cloudflare(""): Cannot use the access token from location: XXX.XXX.XXX.XXX (9109)Done. 0 corrections." but the exit code is 0.
If you try to run the command without a token (token field empty), the exit code is 1.
Expected behavior
There should be an error exit code, the same like if you run with empty token field.
DNS Provider
CLOUDFLAREAPI
Additional context
When used in a GitLab pipeline, it's confusing when the preview job ends with success even though it was no successful.
The text was updated successfully, but these errors were encountered:
Describe the bug
With CLOUDFLAREAPI, even if an invalid API token is used and
preview
ends with "ERROR", the exit code is 0.That's especially confusing when using in a pipeline.
To Reproduce
docker run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json -v $(pwd)/spfcache.updated.json:/dns/spfcache.updated.json -v $(pwd)/spfcache.json:/dns/spfcache.json -v $(pwd)/zones/:/dns/zones/ -u $(id -u ${USER}):$(id -g ${USER}) stackexchange/dnscontrol preview
Same issue happens if you forget to whitelist your IP on CloudFlare and attempt to connect there. The output is "ERROR: ERROR: failed fetching domain list from cloudflare(""): Cannot use the access token from location: XXX.XXX.XXX.XXX (9109)Done. 0 corrections." but the exit code is 0.
If you try to run the command without a token (token field empty), the exit code is 1.
Expected behavior
There should be an error exit code, the same like if you run with empty token field.
DNS Provider
CLOUDFLAREAPI
Additional context
When used in a GitLab pipeline, it's confusing when the preview job ends with success even though it was no successful.
The text was updated successfully, but these errors were encountered: