@ai-matrx/associations 0.14.90 → 0.14.91

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.
@@ -152,6 +152,8 @@ var SIGNED_OUT_LEAD = "You're signed out";
152
152
  var SIGNED_OUT_MESSAGE = `${SIGNED_OUT_LEAD}. Sign in again \u2014 your text is kept here.`;
153
153
  function createRpcResultHelpers(errorSink, sessionAttached) {
154
154
  function mapPgError(e) {
155
+ if (e?.name === "NotAuthenticatedError")
156
+ return { code: "unauthorized", message: SIGNED_OUT_MESSAGE };
155
157
  const { pgCode, pgMessage, pgHint } = readPgFields(e);
156
158
  if (pgCode === "PGRST202") {
157
159
  const message = "demanded schema violation: the database this client is pointed at cannot answer a demanded @ai-matrx/associations RPC (PostgREST PGRST202 \u2014 function not found). This package DEMANDS the platform " + `schema (README \xA7 The demanded schema). ${pgMessage ?? ""}`.trim();