Documentation

Logwise is designed to be the simplest error explanation tool for developers.
Use our official Node.js SDK for the best experience.

1Installation

npm install logwise-sdk

2Configuration

Set your API key in your environment variables (or .env file).

LOGWISE_API_KEY=sk_live_...

3Usage

Catch an error and explain it in one line.

Parameters

  • errorThe Error object or string you want explained.
  • optionsOptional config object: { includeFix: boolean }
import { explain } from 'logwise-sdk';

try {
  // Your risky code...
  throw new Error("Something went wrong!");
} catch (error) {
  // Pass the raw error object directly
  const { explanation, fix } = await explain(error, { includeFix: true });
  console.log(explanation);
  console.log(fix); // Array of steps to solve it
}

Rate Limits

We enforce a rate limit of 100 requests per minute to prevent abuse. In addition, your account is subject to a monthly quota based on your plan (e.g., 100 requests/month for the Free plan).