mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
refactor(http): implement bufio (#1604)
* fix: misc http fixes * feat(io): implement bufio around syscalls * peek-a-boo * this can't be right. * you better be wearing a helmet * jesus christ. * refactor(notifications): check err on non-ok status * fix(notifications): add missing name method * refactor(indexer): api clients * fix(indexer): ptp test --------- Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
d13b421c42
commit
cc0cca9f0d
22 changed files with 465 additions and 304 deletions
|
@ -773,13 +773,15 @@ func (s *service) webhook(ctx context.Context, external domain.FilterExternal, r
|
|||
|
||||
s.log.Debug().Msgf("filter external webhook response status: %d", res.StatusCode)
|
||||
|
||||
body, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return res.StatusCode, errors.Wrap(err, "could not read request body")
|
||||
}
|
||||
if s.log.Debug().Enabled() {
|
||||
body, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return res.StatusCode, errors.Wrap(err, "could not read request body")
|
||||
}
|
||||
|
||||
if len(body) > 0 {
|
||||
s.log.Debug().Msgf("filter external webhook response status: %d body: %s", res.StatusCode, body)
|
||||
if len(body) > 0 {
|
||||
s.log.Debug().Msgf("filter external webhook response status: %d body: %s", res.StatusCode, body)
|
||||
}
|
||||
}
|
||||
|
||||
if utils.StrSliceContains(retryStatusCodes, strconv.Itoa(res.StatusCode)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue