Resolves a caller-supplied diagnostics mode, defaulting to "warn" and
throwing on any other value.
Every entry path for the option, per-request options
(RequestOptions.diagnostics), the MAL refresh lifecycle, and the
pagination helpers, validates through this one helper so a typo like
"verbose" fails fast with the received value in the message, matching
the fail-fast convention of resolveRequestOptions, instead of behaving
as an accidental quasi-"hook" mode deep inside the emit path.
Resolves a caller-supplied diagnostics mode, defaulting to
"warn"and throwing on any other value.Every entry path for the option, per-request options (RequestOptions.diagnostics), the MAL refresh lifecycle, and the pagination helpers, validates through this one helper so a typo like
"verbose"fails fast with the received value in the message, matching the fail-fast convention ofresolveRequestOptions, instead of behaving as an accidental quasi-"hook"mode deep inside the emit path.