docs: correct README error contract (initialize-time, raw discord exceptions)

the README Errors section claimed resolution raises ValueError 'at call time', but per-call resolution is swallowed with send failures and the raise happens at initialize() — and the raised type can be an underlying discord exception (NotFound/Forbidden/HTTPException), not only ValueError. corrected to match the code and the module docstring.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
disqualifier 2026-06-29 01:39:21 -04:00
parent dd56009add
commit f480a7c077

View File

@ -70,10 +70,13 @@ await bot.log.debug("noisy", log_to_file=False) # -> Discord only
## Errors
Resolution failures (unresolvable guild/channel, bad config) raise `ValueError` at
`initialize`/call time — a misconfigured logger should fail loudly at setup. Per-call
**send** failures do **not** propagate: they fall back to the stdlib logger so a
transient Discord failure never breaks the caller's command.
Resolution failures (unresolvable guild/channel, bad config) raise from `initialize()`
— a misconfigured logger should fail loudly at setup. The raised type is usually
`ValueError`, but an underlying `discord` exception (`NotFound` / `Forbidden` /
`HTTPException`) from `fetch_guild`/`fetch_channel` can also propagate. On a **per-call**
send, neither resolution nor send failures propagate: they fall back to the stdlib
logger so a transient Discord failure (or a per-call `guild=` that doesn't resolve)
never breaks the caller's command.
## Construction contract