@travetto/model-sqlite 8.0.0-alpha.17 → 8.0.0-alpha.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-sqlite",
3
- "version": "8.0.0-alpha.17",
3
+ "version": "8.0.0-alpha.19",
4
4
  "type": "module",
5
5
  "description": "SQLite backing for the travetto model module, with real-time modeling support for SQL schemas.",
6
6
  "keywords": [
@@ -27,11 +27,11 @@
27
27
  "directory": "module/model-sqlite"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/config": "^8.0.0-alpha.15",
31
- "@travetto/context": "^8.0.0-alpha.14",
32
- "@travetto/model": "^8.0.0-alpha.15",
33
- "@travetto/model-query": "^8.0.0-alpha.16",
34
- "@travetto/model-sql": "^8.0.0-alpha.17"
30
+ "@travetto/config": "^8.0.0-alpha.17",
31
+ "@travetto/context": "^8.0.0-alpha.16",
32
+ "@travetto/model": "^8.0.0-alpha.17",
33
+ "@travetto/model-query": "^8.0.0-alpha.18",
34
+ "@travetto/model-sql": "^8.0.0-alpha.19"
35
35
  },
36
36
  "travetto": {
37
37
  "displayName": "SQLite Model Service"
package/src/connection.ts CHANGED
@@ -98,7 +98,7 @@ export class SqliteConnection extends Connection<DatabaseSync> {
98
98
  }
99
99
  } catch (error) {
100
100
  const code = error && typeof error === 'object' && 'code' in error ? error.code : undefined;
101
- const message = Error.isError(error) ? error.message : undefined;
101
+ const message = (Error.isError(error) || error instanceof Error) ? error.message : undefined;
102
102
  switch (code) {
103
103
  case 'ERR_SQLITE_ERROR': {
104
104
  if (message?.startsWith('UNIQUE')) {