hs-playlib 0.4.0 → 0.6.0

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.
@@ -135,13 +135,11 @@ class UniffiClient {
135
135
  try {
136
136
  const reqErr = proto_js_1.types.RequestError.decode(bytes);
137
137
  if (reqErr.errorMessage) {
138
- const err = new Error(reqErr.errorMessage);
139
- err.ffiError = reqErr;
140
- throw err;
138
+ throw reqErr;
141
139
  }
142
140
  }
143
141
  catch (e) {
144
- if (e.ffiError)
142
+ if (e instanceof proto_js_1.types.RequestError)
145
143
  throw e;
146
144
  // decode failed — not an error proto, return bytes as-is
147
145
  }
@@ -171,13 +169,11 @@ class UniffiClient {
171
169
  try {
172
170
  const resErr = proto_js_1.types.ResponseError.decode(bytes);
173
171
  if (resErr.errorMessage) {
174
- const err = new Error(resErr.errorMessage);
175
- err.ffiError = resErr;
176
- throw err;
172
+ throw resErr;
177
173
  }
178
174
  }
179
175
  catch (e) {
180
- if (e.ffiError)
176
+ if (e instanceof proto_js_1.types.ResponseError)
181
177
  throw e;
182
178
  // decode failed — not an error proto, return bytes as-is
183
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hs-playlib",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Hyperswitch Payments SDK — Node.js client for connector integrations via UniFFI FFI",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",