diff --git a/infrastructure/url_checker.go b/infrastructure/url_checker.go index a2ff0d9..917b5d2 100644 --- a/infrastructure/url_checker.go +++ b/infrastructure/url_checker.go @@ -650,6 +650,9 @@ func (c *URLCheckerClient) tryHeadRequestAsBrowserIfForbidden(ctx context.Contex func (c *URLCheckerClient) limitedBody(response *resty.Response) string { body := response.RawBody() + if body == nil { + return "" + } defer body.Close() return safelyTrimmedStream(body, c.settings.LimitBodyToNBytes) }