Errors and exception handling - exentio/nhentai_api GitHub Wiki
Exceptions in case of 404 or invalid input are NOT handled. I suggest using the Nhentai().id_exists()
function to check for 404s.
Some functions in case of a request error give this output: {"error": True}
. This behavior is the same output that nHentai APIs give on error.
The only exception raising I implemented is when the parameter of Nhentai().all()
is bigger than the number of actual pages on the website.
Let me know if these things are not good practice.