Skip to content

Commit 19ab0f2

Browse files
authored
Merge pull request #62 from dschanoeh/feature/add-url-to-http-status-error
Add URL to http status code error
2 parents e3b8c47 + 7798d01 commit 19ab0f2

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)