Skip to content

Commit 7798d01

Browse files
committed
Add URL to http status code error
1 parent a383dd3 commit 7798d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (r *ResourceBase[T]) Sync(ctx context.Context) error {
233233
r.SetNext(next)
234234

235235
if res.StatusCode != http.StatusOK {
236-
return fmt.Errorf(`httprc.Resource.Sync: %w (status code=%d)`, errUnexpectedStatusCode, res.StatusCode)
236+
return fmt.Errorf(`httprc.Resource.Sync: %w (status code=%d, url=%q)`, errUnexpectedStatusCode, res.StatusCode, r.u)
237237
}
238238

239239
// replace the body of the response with a limited reader that

0 commit comments

Comments
 (0)