chore(all): review error wrappings
- remove repetitive `cannot` and `failed` prefixes - rename `unmarshaling` to `decoding`
This commit is contained in:
@@ -61,7 +61,7 @@ func (f *Fetch) FetchInfo(ctx context.Context, ip net.IP) (
|
||||
|
||||
decoder := json.NewDecoder(response.Body)
|
||||
if err := decoder.Decode(&result); err != nil {
|
||||
return result, fmt.Errorf("cannot decode response: %w", err)
|
||||
return result, fmt.Errorf("decoding response: %w", err)
|
||||
}
|
||||
|
||||
countryCode := strings.ToLower(result.Country)
|
||||
|
||||
Reference in New Issue
Block a user