github elbywan/wretch 3.0.2

one day ago

🐛 Bug fix(es)

  • Clone the body before assigning to WretchError message (5379037), closes #277
try {
  // ..blah
} catch (err: unknown)
  if (err instanceof WretchError)
    // Should now work fine, used to crash with an error of type: "body has already been read"
    console.log(await err.response.json());
  }
}

Don't miss a new wretch release

NewReleases is sending notifications on new releases.