Fix a few error messages
This commit is contained in:
parent
39d9f6d258
commit
9cbfc58f35
2 changed files with 3 additions and 4 deletions
|
|
@ -642,7 +642,7 @@ func handleTokenRequest(ctx context.Context, req *http.Request) (*OAuthTokenResp
|
||||||
if errorResp.Error.Code == 498 && errorResp.Error.Description == "invalidated refresh_token" {
|
if errorResp.Error.Code == 498 && errorResp.Error.Description == "invalidated refresh_token" {
|
||||||
return nil, InvalidatedTokenError{}
|
return nil, InvalidatedTokenError{}
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("API response JSON error: %d: %w", resp.StatusCode, errorResp)
|
return nil, fmt.Errorf("API response JSON error: %d: %d %s", resp.StatusCode, errorResp.Error.Code, errorResp.Error.Description)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("API returned error status %d: %s", resp.StatusCode, bodyString)
|
return nil, fmt.Errorf("API returned error status %d: %s", resp.StatusCode, bodyString)
|
||||||
}
|
}
|
||||||
|
|
@ -931,8 +931,7 @@ func hasUpdates(row map[string]string, feature arcgis.Feature) bool {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info().Msg(fmt.Sprintf("key: %s\tvalue: %w (type %T)\trow: %s\n", key, value, value, rowdata))
|
log.Error().Str("key", key).Str("rowdata", rowdata).Msg("we've hit a point where we can't tell if we have an update or not, need a programmer to look at the above")
|
||||||
log.Error().Msg("we've hit a point where we can't tell if we have an update or not, need a programmer to look at the above")
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
sms.go
2
sms.go
|
|
@ -50,7 +50,7 @@ func handleSMSMessage(data *SMSWebhookData) error {
|
||||||
for _, media := range data.Payload.Media {
|
for _, media := range data.Payload.Media {
|
||||||
filePath, err := downloadMedia(media.URL)
|
filePath, err := downloadMedia(media.URL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("Failed to download media from %s: %w", err)
|
fmt.Errorf("Failed to download media from %s: %w", filePath, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fmt.Printf("Downloaded media to: %s\n", filePath)
|
fmt.Printf("Downloaded media to: %s\n", filePath)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue