Skip to content

Commit 3f66b99

Browse files
yuranichNamelsKing
andauthored
fix[notask]: pass options object to QvacErrorRAG in RAG crypto fallbacks (***REMOVED***1664)
* fix: pass options object to QvacErrorRAG in RAG crypto fallbacks (***REMOVED***1663) * chore: bump @qvac/error floor to ^0.1.2 in @qvac/rag * chore: use @qvac/error ^0.1.1 (0.1.2 not yet published to npm) --------- Co-authored-by: Dmytro Medvinskyi <functionsilence@gmail.com>
1 parent e3736c9 commit 3f66b99

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/rag/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"test-tmp": "^1.4.0"
4343
},
4444
"dependencies": {
45-
"@qvac/error": "^0.1.0",
45+
"@qvac/error": "^0.1.1",
4646
"hyperdht": "^6.23.0",
4747
"ready-resource": "^1.1.2",
4848
"uuid-random": "^1.3.2",

packages/rag/src/adapters/database/HyperDBAdapter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ try {
2222
if (typeof global !== 'undefined' && global.crypto && global.crypto.createHash) {
2323
qvacCrypto = global.crypto
2424
} else {
25-
throw new QvacErrorRAG(
26-
ERR_CODES.DEPENDENCY_REQUIRED,
27-
'No crypto implementation found. Please ensure a crypto module is available in your environment.'
28-
)
25+
throw new QvacErrorRAG({
26+
code: ERR_CODES.DEPENDENCY_REQUIRED,
27+
adds: 'No crypto implementation found. Please ensure a crypto module is available in your environment.'
28+
})
2929
}
3030
}
3131
}

packages/rag/src/utils/helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ try {
77
global.crypto = crypto
88
} catch (e2) {
99
if (typeof global === 'undefined' || (typeof global !== 'undefined' && !global.crypto)) {
10-
throw new QvacErrorRAG(
11-
ERR_CODES.DEPENDENCY_REQUIRED,
12-
'No crypto implementation found. Please ensure a crypto module is available in your environment.'
13-
)
10+
throw new QvacErrorRAG({
11+
code: ERR_CODES.DEPENDENCY_REQUIRED,
12+
adds: 'No crypto implementation found. Please ensure a crypto module is available in your environment.'
13+
})
1414
}
1515
}
1616
const uuid = require('uuid-random')

0 commit comments

Comments
 (0)