JavaScript / TypeScript
Warnings
Warnings report conditions that do not fail the call. They go to the logger at level warn and to onWarning({ code, message, details }).
| Code | When |
|---|---|
STALE_DATA | The API served a cached copy because the new tibia.com read failed (stale: true). |
PARTIAL_FAILURE | Some worlds of online.list failed or do not exist. |
RATE_LIMIT_LOW | 10% or less of the rate limit window is left. |
RETRYING | A request is being retried, with the reason and the delay. |
API_VERSION_MISMATCH | The API answered with another major version than the SDK supports. |
DEPRECATED | The API marked the route as deprecated (Deprecation or Sunset headers). |
API_KEY_IN_BROWSER | An apiKey is used in a browser. |
INSECURE_BASE_URL | The base URL uses http (local development only). |
HOOK_FAILED | An onRequest or onResponse hook threw; the request continued. |
ts
const client = new Umanthir({
onWarning: (warning) => metrics.increment(`umanthir.warning.${warning.code}`),
});Next: Debug logs and hooks.