geonix 1.8.3 → 1.8.4
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 +1 -1
- package/src/Connection.js +1 -9
- package/src/Request.js +3 -1
package/package.json
CHANGED
package/src/Connection.js
CHANGED
|
@@ -104,15 +104,7 @@ class Connection {
|
|
|
104
104
|
|
|
105
105
|
await this.#nc.publish(subject, payload)
|
|
106
106
|
|
|
107
|
-
let response
|
|
108
|
-
try {
|
|
109
|
-
response = await this.#nc.subscribe(respondTo, { max: 1, ...options })
|
|
110
|
-
} catch (e) {
|
|
111
|
-
console.debug('GxDebug -----')
|
|
112
|
-
console.log({ subject, json })
|
|
113
|
-
console.debug('-------------')
|
|
114
|
-
throw e
|
|
115
|
-
}
|
|
107
|
+
let response = await this.#nc.subscribe(respondTo, { max: 1, ...options })
|
|
116
108
|
|
|
117
109
|
for await (let event of response)
|
|
118
110
|
return codec.decode(event.data)
|
package/src/Request.js
CHANGED
|
@@ -77,6 +77,7 @@ export async function Request(service, method, args = [], context = [], options)
|
|
|
77
77
|
if (!identifier)
|
|
78
78
|
throw Error(`Request: requested instance of ${service} not found`)
|
|
79
79
|
|
|
80
|
+
let response
|
|
80
81
|
try {
|
|
81
82
|
const originator = getOriginator()
|
|
82
83
|
let response = await connection.request(
|
|
@@ -89,7 +90,8 @@ export async function Request(service, method, args = [], context = [], options)
|
|
|
89
90
|
},
|
|
90
91
|
options)
|
|
91
92
|
} catch (e) {
|
|
92
|
-
|
|
93
|
+
console.error('Request.error', { originator, service, method, args })
|
|
94
|
+
throw e
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
// automatically process streamed response
|