Skip to content

Add new option to change no content found error into HTTP 403 error#2799

Merged
dteviot merged 2 commits into
dteviot:ExperimentalTabModefrom
Yomafil:Add-No-Content-To-Error-403-Option
Jul 13, 2026
Merged

Add new option to change no content found error into HTTP 403 error#2799
dteviot merged 2 commits into
dteviot:ExperimentalTabModefrom
Yomafil:Add-No-Content-To-Error-403-Option

Conversation

@Yomafil

@Yomafil Yomafil commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Add the option to turn no content found error into an HTTP 403 error.
It is useful as a workaround when isCustomError and setCustomErrorResponse are not implemented in a parser.
When a site gives the wrong error code when giving the user a challenge page (captcha, Cloudflare, rate limit, etc...).
It allows the user to clear the challenge page and resume downloading from where they were, instead of losing all progress or ending up with multiple fragmented EPUBs when downloading a single book.

Tested and working on alicesw.com, with and without isCustomError and setCustomErrorResponse implemented in the AliceswParser.

Only issue is the fact that this implementation doesn't work if a custom parser already include fetchChapter without passing a reference to the parser in the wrapOptions.
If it fails in this way and the NoContentToError403 option is selected, it will now throw an HTTP 403 error instead of a no content found error, before aborting the download.

Tested and failing (has expected) on alicesw.com, without passing a reference to the parser in wrapOptions when fetchChapter implemented in the AliceswParser.
Tested and working on alicesw.com, while passing a reference to the parser in wrapOptions when fetchChapter implemented in the AliceswParser.

#2785

@dteviot dteviot merged commit da6b70b into dteviot:ExperimentalTabMode Jul 13, 2026
1 check passed
@dteviot

dteviot commented Jul 13, 2026

Copy link
Copy Markdown
Owner

@Yomafil

It's an advanced option. I'll accept it.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants