@axium/server 0.39.6 → 0.39.7

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.
Files changed (2) hide show
  1. package/dist/auth.js +2 -2
  2. package/package.json +1 -1
package/dist/auth.js CHANGED
@@ -121,8 +121,8 @@ export async function authSessionForItem(itemType, itemId, permissions, session,
121
121
  .select(acl.from(itemType))
122
122
  .executeTakeFirstOrThrow()
123
123
  .catch(e => {
124
- if (e.message.includes('no rows'))
125
- error(404, itemType + ' not found');
124
+ if (e.constructor.name == 'NoResultError' || e.message.includes('no rows'))
125
+ error(404, 'Not found');
126
126
  throw e;
127
127
  }));
128
128
  const result = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.39.6",
3
+ "version": "0.39.7",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",