UMANTHIR

JavaScript / TypeScript

Debug logs and hooks

ts
const client = new Umanthir({ debug: true });
await client.characters.get("Njorn");
// [umanthir] → GET https://api.umanthir.com/v2/community/characters/Njorn (attempt 1)
// [umanthir] ← 200 GET https://api.umanthir.com/v2/community/characters/Njorn 182ms X-API-Version=2.4.2 RateLimit-Remaining=59

In Node.js, UMANTHIR_LOG=debug node app.js enables it without code changes. Credentials are always replaced by [REDACTED]; response bodies are logged only with logBodies: true, truncated to 2 KB; request bodies are never logged.

Hooks receive structured data, for metrics or tracing:

ts
const client = new Umanthir({
  onResponse: ({ method, url, status, durationMs, attempt }) =>
    console.log(method, url, status, `${durationMs}ms`, `attempt ${attempt}`),
});

Nothing leaves your process: the SDK has no telemetry.

Next: Timeouts, retries and cancellation.

Cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.

Manage cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.