Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKAMAIEDGEDNS: CODEMAINT: Update error-handling to support wrapped errors #3314

Open
tlimoncelli opened this issue Jan 6, 2025 · 0 comments

Comments

@tlimoncelli
Copy link
Contributor

CC @edglynes

Hello friend!

This is low priority, and feel free to respond with "nope, not worth fixing". However I thought I'd let you know:

Describe the bug

errorlint reports:

dnscontrol$ golangci-lint run --sort-results --enable-only errorlint
providers/akamaiedgedns/akamaiEdgeDnsService.go:115:37: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
		if dnsv2.IsConfigDNSError(err) && err.(dnsv2.ConfigDNSError).NotFound() {
		                                  ^
providers/akamaiedgedns/akamaiEdgeDnsService.go:129:37: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
		if dnsv2.IsConfigDNSError(err) && err.(dnsv2.ConfigDNSError).NotFound() {
		                                  ^
providers/akamaiedgedns/akamaiEdgeDnsService.go:244:37: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
		if dnsv2.IsConfigDNSError(err) && err.(dnsv2.ConfigDNSError).NotFound() {

To Reproduce
Steps to reproduce the behavior:

see above

Expected behavior
n/a

DNS Provider

  • AKAMAIEDGEDNS

Additional context
n/a

@tlimoncelli tlimoncelli changed the title Linting for AkamaiEdgeDns AKAMAIEDGEDNS: CODEMAINT: Update error-handling to support wrapped errors Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants