autobrr/internal/domain
soup a5d6da7373
feat(releases): improve error handling on torrent download (#880)
* feat/check-content-type-torrent-download

* check for text/html instead

* check for status codes above 308

* refactor

* make sure < 499 goes to content-type check

* fix content header check by accounting for charset

* retry on 404

* change to errors.New for 404

* make use of verbs

* handle http errors as cases

* check contentType with strings.Contains instead

* adjust message for unauthorized and forbidden

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-05-06 18:22:08 +02:00
..
testdata feat(releases): retry failed downloads (#491) 2022-10-19 21:52:31 +02:00
action.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
api.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
client.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
client_test.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
config.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
event.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
feed.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
filter.go fix(filters): handle empty tag_match_logic by defaulting to ANY (#910) 2023-05-06 16:11:34 +02:00
filter_test.go fix(filters): handle empty tag_match_logic by defaulting to ANY (#910) 2023-05-06 16:11:34 +02:00
indexer.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
indexer_test.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
irc.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
macros.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
macros_test.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
notification.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
release.go feat(releases): improve error handling on torrent download (#880) 2023-05-06 18:22:08 +02:00
release_test.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
releasetags.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
releasetags_test.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00
user.go chore: add LICENSE GPLv2-or-later (#897) 2023-05-01 16:21:59 +02:00