@niledatabase/server 5.0.3 → 5.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -660,6 +660,7 @@ async function auth(req, config) {
660
660
  info(`using session ${sessionUrl}`);
661
661
  req.headers.delete("content-length");
662
662
  const res = await request(sessionUrl, { request: req }, config);
663
+ const cloned = res.clone();
663
664
  try {
664
665
  const session = await new Response(res.body).json();
665
666
  if (Object.keys(session).length === 0) {
@@ -668,8 +669,8 @@ async function auth(req, config) {
668
669
  }
669
670
  info("session active");
670
671
  return session;
671
- } catch (e) {
672
- error(e);
672
+ } catch {
673
+ error(cloned.text());
673
674
  return void 0;
674
675
  }
675
676
  }