@budibase/backend-core 2.23.10 → 2.23.11

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
@@ -64830,7 +64830,6 @@ var getMigrationsDoc = async (db) => {
64830
64830
  if (err.status && err.status === 404) {
64831
64831
  return { _id: "migrations" /* MIGRATIONS */ };
64832
64832
  } else {
64833
- console.error(err);
64834
64833
  throw err;
64835
64834
  }
64836
64835
  }
@@ -65334,7 +65333,6 @@ async function strategyFactory(config, callbackUrl, saveUserFn) {
65334
65333
  verify
65335
65334
  );
65336
65335
  } catch (err) {
65337
- console.error(err);
65338
65336
  throw new Error(`Error constructing google authentication strategy: ${err}`);
65339
65337
  }
65340
65338
  }
@@ -65399,7 +65397,6 @@ async function strategyFactory2(config, saveUserFn) {
65399
65397
  strategy.name = "oidc";
65400
65398
  return strategy;
65401
65399
  } catch (err) {
65402
- console.error(err);
65403
65400
  throw new Error(`Error constructing OIDC authentication strategy - ${err}`);
65404
65401
  }
65405
65402
  }
@@ -65428,7 +65425,6 @@ async function fetchStrategyConfig(oidcConfig, callbackUrl) {
65428
65425
  callbackURL: callbackUrl
65429
65426
  };
65430
65427
  } catch (err) {
65431
- console.error(err);
65432
65428
  throw new Error(
65433
65429
  `Error constructing OIDC authentication configuration - ${err}`
65434
65430
  );
@@ -65774,7 +65770,6 @@ function authenticated_default(noAuthPatterns = [], opts = {
65774
65770
  } catch (err) {
65775
65771
  authenticated = false;
65776
65772
  console.error(`Auth Error: ${err.message}`);
65777
- console.error(err);
65778
65773
  clearCookie(ctx, "budibase:auth" /* Auth */);
65779
65774
  }
65780
65775
  }
@@ -65816,7 +65811,6 @@ function authenticated_default(noAuthPatterns = [], opts = {
65816
65811
  }
65817
65812
  } catch (err) {
65818
65813
  console.error(`Auth Error: ${err.message}`);
65819
- console.error(err);
65820
65814
  if (err?.name === "JsonWebTokenError") {
65821
65815
  clearCookie(ctx, "budibase:auth" /* Auth */);
65822
65816
  } else if (err?.code === "invalid_api_key" /* INVALID_API_KEY */) {
@@ -66003,7 +65997,7 @@ async function errorHandling(ctx, next) {
66003
65997
  if (status >= 400 && status < 500) {
66004
65998
  console.warn(err);
66005
65999
  } else {
66006
- console.error(err);
66000
+ console.error("Got 400 response code", err);
66007
66001
  }
66008
66002
  let error = {
66009
66003
  message: err.message,
@@ -66106,7 +66100,6 @@ async function refreshOIDCAccessToken(chosenConfig, refreshToken) {
66106
66100
  }
66107
66101
  strategy = await oidc_exports.strategyFactory(enrichedConfig, ssoSaveUserNoOp);
66108
66102
  } catch (err) {
66109
- console.error(err);
66110
66103
  throw new Error("Could not refresh OAuth Token");
66111
66104
  }
66112
66105
  refresh.use(strategy, {
@@ -66134,7 +66127,6 @@ async function refreshGoogleAccessToken(config, refreshToken) {
66134
66127
  ssoSaveUserNoOp
66135
66128
  );
66136
66129
  } catch (err) {
66137
- console.error(err);
66138
66130
  throw new Error(
66139
66131
  `Error constructing OIDC refresh strategy: message=${err.message}`
66140
66132
  );