mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-13 10:58:17 +08:00
825ba2d081
* Replaced errors.Wrap with fmt.Errorf (#589) * Find: errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\) Replace: fmt.Errorf($2: %w$3, $1) * Replaced errors.Wrapf with fmt.Errorf (#589) * Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\) Replace: fmt.Errorf($2: %w$3, $1) * Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\) * Replace: fmt.Errorf($2: %w$3$4, $1) * Replaced errors.Errorf with fmt.Errorf (#589) * Find: errors\.Errorf Replace: fmt.Errorf * Cleaned up remaining imports * Cleanup * Regenerate provider support matrix This was broken by #533 ... and it's now the third time this has been missed.
12 lines
347 B
Go
12 lines
347 B
Go
package hexonet
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
lr "github.com/hexonet/go-sdk/response/listresponse"
|
|
)
|
|
|
|
// GetHXApiError returns an error including API error code and error description.
|
|
func (n *HXClient) GetHXApiError(format string, objectid string, r *lr.ListResponse) error {
|
|
return fmt.Errorf(format+" %s. [%s %s]", objectid, r.Code(), r.Description())
|
|
}
|