@niledatabase/server 5.1.0-alpha.0 → 5.1.0

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.js CHANGED
@@ -666,6 +666,7 @@ async function auth(req, config) {
666
666
  info(`using session ${sessionUrl}`);
667
667
  req.headers.delete("content-length");
668
668
  const res = await request(sessionUrl, { request: req }, config);
669
+ const cloned = res.clone();
669
670
  try {
670
671
  const session = await new Response(res.body).json();
671
672
  if (Object.keys(session).length === 0) {
@@ -674,8 +675,8 @@ async function auth(req, config) {
674
675
  }
675
676
  info("session active");
676
677
  return session;
677
- } catch (e) {
678
- error(e);
678
+ } catch {
679
+ error(cloned.text());
679
680
  return void 0;
680
681
  }
681
682
  }