rezo 1.0.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.
Files changed (135) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1507 -0
  3. package/assets/icon.svg +37 -0
  4. package/assets/logo-dark.svg +47 -0
  5. package/assets/logo.svg +58 -0
  6. package/dist/adapters/curl.cjs +1034 -0
  7. package/dist/adapters/curl.js +1031 -0
  8. package/dist/adapters/entries/curl.cjs +4 -0
  9. package/dist/adapters/entries/curl.d.ts +2136 -0
  10. package/dist/adapters/entries/curl.js +2 -0
  11. package/dist/adapters/entries/fetch.cjs +2 -0
  12. package/dist/adapters/entries/fetch.d.ts +2127 -0
  13. package/dist/adapters/entries/fetch.js +1 -0
  14. package/dist/adapters/entries/http.cjs +2 -0
  15. package/dist/adapters/entries/http.d.ts +2126 -0
  16. package/dist/adapters/entries/http.js +1 -0
  17. package/dist/adapters/entries/http2.cjs +4 -0
  18. package/dist/adapters/entries/http2.d.ts +2136 -0
  19. package/dist/adapters/entries/http2.js +2 -0
  20. package/dist/adapters/entries/react-native.cjs +2 -0
  21. package/dist/adapters/entries/react-native.d.ts +2126 -0
  22. package/dist/adapters/entries/react-native.js +1 -0
  23. package/dist/adapters/entries/xhr.cjs +2 -0
  24. package/dist/adapters/entries/xhr.d.ts +2127 -0
  25. package/dist/adapters/entries/xhr.js +1 -0
  26. package/dist/adapters/fetch.cjs +740 -0
  27. package/dist/adapters/fetch.js +739 -0
  28. package/dist/adapters/http.cjs +1153 -0
  29. package/dist/adapters/http.js +1151 -0
  30. package/dist/adapters/http2.cjs +957 -0
  31. package/dist/adapters/http2.js +956 -0
  32. package/dist/adapters/index.cjs +6 -0
  33. package/dist/adapters/index.js +7 -0
  34. package/dist/adapters/picker.cjs +342 -0
  35. package/dist/adapters/picker.js +331 -0
  36. package/dist/adapters/react-native.cjs +545 -0
  37. package/dist/adapters/react-native.js +544 -0
  38. package/dist/adapters/xhr.cjs +622 -0
  39. package/dist/adapters/xhr.js +621 -0
  40. package/dist/cache/dns-cache.cjs +118 -0
  41. package/dist/cache/dns-cache.js +113 -0
  42. package/dist/cache/file-cacher.cjs +264 -0
  43. package/dist/cache/file-cacher.js +261 -0
  44. package/dist/cache/index.cjs +13 -0
  45. package/dist/cache/index.js +5 -0
  46. package/dist/cache/lru-cache.cjs +96 -0
  47. package/dist/cache/lru-cache.js +93 -0
  48. package/dist/cache/response-cache.cjs +314 -0
  49. package/dist/cache/response-cache.js +310 -0
  50. package/dist/cache/url-store.cjs +288 -0
  51. package/dist/cache/url-store.js +285 -0
  52. package/dist/core/hooks.cjs +133 -0
  53. package/dist/core/hooks.js +120 -0
  54. package/dist/core/rezo.cjs +464 -0
  55. package/dist/core/rezo.js +458 -0
  56. package/dist/crawler.d.ts +6255 -0
  57. package/dist/dom/index.cjs +1 -0
  58. package/dist/dom/index.d.ts +23 -0
  59. package/dist/dom/index.js +1 -0
  60. package/dist/entries/crawler.cjs +5 -0
  61. package/dist/entries/crawler.js +2 -0
  62. package/dist/errors/rezo-error.cjs +722 -0
  63. package/dist/errors/rezo-error.js +716 -0
  64. package/dist/index.cjs +34 -0
  65. package/dist/index.d.ts +3335 -0
  66. package/dist/index.js +26 -0
  67. package/dist/platform/browser.cjs +9 -0
  68. package/dist/platform/browser.d.ts +3203 -0
  69. package/dist/platform/browser.js +7 -0
  70. package/dist/platform/bun.cjs +9 -0
  71. package/dist/platform/bun.d.ts +3203 -0
  72. package/dist/platform/bun.js +7 -0
  73. package/dist/platform/deno.cjs +9 -0
  74. package/dist/platform/deno.d.ts +3203 -0
  75. package/dist/platform/deno.js +7 -0
  76. package/dist/platform/node.cjs +9 -0
  77. package/dist/platform/node.d.ts +3203 -0
  78. package/dist/platform/node.js +7 -0
  79. package/dist/platform/react-native.cjs +9 -0
  80. package/dist/platform/react-native.d.ts +3203 -0
  81. package/dist/platform/react-native.js +7 -0
  82. package/dist/platform/worker.cjs +9 -0
  83. package/dist/platform/worker.d.ts +3203 -0
  84. package/dist/platform/worker.js +7 -0
  85. package/dist/plugin/addon/decodo/index.cjs +1 -0
  86. package/dist/plugin/addon/decodo/index.js +1 -0
  87. package/dist/plugin/addon/decodo/options.cjs +1 -0
  88. package/dist/plugin/addon/decodo/options.js +1 -0
  89. package/dist/plugin/addon/oxylabs/index.cjs +1 -0
  90. package/dist/plugin/addon/oxylabs/index.js +1 -0
  91. package/dist/plugin/addon/oxylabs/options.cjs +1 -0
  92. package/dist/plugin/addon/oxylabs/options.js +1 -0
  93. package/dist/plugin/crawler-options.cjs +1 -0
  94. package/dist/plugin/crawler-options.js +1 -0
  95. package/dist/plugin/crawler.cjs +519 -0
  96. package/dist/plugin/crawler.js +517 -0
  97. package/dist/plugin/index.cjs +36 -0
  98. package/dist/plugin/index.js +32 -0
  99. package/dist/proxy/index.cjs +142 -0
  100. package/dist/proxy/index.js +139 -0
  101. package/dist/responses/buildError.cjs +452 -0
  102. package/dist/responses/buildError.js +441 -0
  103. package/dist/responses/buildResponse.cjs +365 -0
  104. package/dist/responses/buildResponse.js +361 -0
  105. package/dist/responses/download.cjs +54 -0
  106. package/dist/responses/download.js +52 -0
  107. package/dist/responses/stream.cjs +60 -0
  108. package/dist/responses/stream.js +58 -0
  109. package/dist/responses/upload.cjs +54 -0
  110. package/dist/responses/upload.js +52 -0
  111. package/dist/types/cookies.cjs +394 -0
  112. package/dist/types/cookies.js +391 -0
  113. package/dist/types/download.cjs +10 -0
  114. package/dist/types/download.js +10 -0
  115. package/dist/types/rezo-request.cjs +131 -0
  116. package/dist/types/rezo-request.js +131 -0
  117. package/dist/utils/agent-merger.cjs +111 -0
  118. package/dist/utils/agent-merger.js +108 -0
  119. package/dist/utils/compression.cjs +84 -0
  120. package/dist/utils/compression.js +82 -0
  121. package/dist/utils/cookies.cjs +514 -0
  122. package/dist/utils/cookies.js +511 -0
  123. package/dist/utils/data-operations.cjs +75 -0
  124. package/dist/utils/data-operations.js +73 -0
  125. package/dist/utils/form-data.cjs +164 -0
  126. package/dist/utils/form-data.js +161 -0
  127. package/dist/utils/headers.cjs +162 -0
  128. package/dist/utils/headers.js +161 -0
  129. package/dist/utils/http-config.cjs +723 -0
  130. package/dist/utils/http-config.js +718 -0
  131. package/dist/utils/index.cjs +8 -0
  132. package/dist/utils/index.js +8 -0
  133. package/dist/utils/tools.cjs +18 -0
  134. package/dist/utils/tools.js +15 -0
  135. package/package.json +172 -0
@@ -0,0 +1,722 @@
1
+ const ERROR_INFO = exports.ERROR_INFO = {
2
+ ECONNREFUSED: {
3
+ code: -111,
4
+ message: "Connection Refused",
5
+ details: "The target server actively refused the TCP connection attempt. This typically means the server is not running or is blocking connections on the specified port.",
6
+ suggestion: "Verify the server is running and accessible. Check firewall rules and ensure the correct host/port is configured."
7
+ },
8
+ ECONNRESET: {
9
+ code: -104,
10
+ message: "Connection Reset",
11
+ details: "An existing TCP connection was forcibly closed by the peer (server or intermediary). This can occur due to server restarts, timeouts, or network issues.",
12
+ suggestion: "Retry the request. If persistent, check server logs or contact the server administrator."
13
+ },
14
+ ETIMEDOUT: {
15
+ code: -110,
16
+ message: "Connection Timeout",
17
+ details: "The attempt to establish a TCP connection timed out with no response received within the timeout period.",
18
+ suggestion: "Increase the timeout value, check network connectivity, or verify the server is responding."
19
+ },
20
+ ENOTFOUND: {
21
+ code: -3008,
22
+ message: "DNS Lookup Failed",
23
+ details: "DNS lookup for the hostname failed. The domain name does not exist or the DNS server returned an error.",
24
+ suggestion: "Verify the hostname is correct and DNS resolution is working. Check your network connection."
25
+ },
26
+ EAI_AGAIN: {
27
+ code: -3001,
28
+ message: "Temporary DNS Failure",
29
+ details: "A temporary failure occurred during DNS name resolution. This is often a transient network issue.",
30
+ suggestion: "Retry the request. If persistent, check your DNS server configuration."
31
+ },
32
+ EPIPE: {
33
+ code: -32,
34
+ message: "Broken Pipe",
35
+ details: "The connection was closed unexpectedly while writing data. The server closed the connection before all data was sent.",
36
+ suggestion: "Retry the request. Check if the server has connection limits or timeout settings."
37
+ },
38
+ EHOSTUNREACH: {
39
+ code: -113,
40
+ message: "Host Unreachable",
41
+ details: "No route to the host could be found. The destination is not reachable from your network.",
42
+ suggestion: "Verify the host address is correct and check your network routing configuration."
43
+ },
44
+ ENETUNREACH: {
45
+ code: -101,
46
+ message: "Network Unreachable",
47
+ details: "The network containing the target host is not reachable. This indicates a routing or connectivity issue.",
48
+ suggestion: "Check your internet connection and network configuration."
49
+ },
50
+ EPROTO: {
51
+ code: -71,
52
+ message: "Protocol Error",
53
+ details: "A protocol error occurred, often during the TLS/SSL handshake phase. This may indicate incompatible protocol versions.",
54
+ suggestion: "Ensure TLS/SSL configuration is compatible with the server. Try disabling specific TLS versions if needed."
55
+ },
56
+ ERR_INVALID_PROTOCOL: {
57
+ code: -1001,
58
+ message: "Invalid URL Protocol",
59
+ details: "The provided URL uses an unsupported or invalid protocol scheme. Only http:// and https:// are supported.",
60
+ suggestion: "Use a valid URL with http:// or https:// protocol."
61
+ },
62
+ ERR_TLS_CERT_ALTNAME_INVALID: {
63
+ code: -1002,
64
+ message: "Certificate Hostname Mismatch",
65
+ details: "The server's SSL/TLS certificate hostname does not match the requested domain (Subject Alternative Name mismatch).",
66
+ suggestion: "Verify you're connecting to the correct host. The certificate may be misconfigured on the server."
67
+ },
68
+ ERR_TLS_HANDSHAKE_TIMEOUT: {
69
+ code: -1003,
70
+ message: "TLS Handshake Timeout",
71
+ details: "The TLS/SSL handshake timed out before completing. This may indicate network latency or server issues.",
72
+ suggestion: "Increase the timeout value or check network connectivity to the server."
73
+ },
74
+ ERR_TLS_INVALID_PROTOCOL_VERSION: {
75
+ code: -1004,
76
+ message: "TLS Protocol Version Mismatch",
77
+ details: "The client and server could not agree on a mutually supported TLS/SSL protocol version.",
78
+ suggestion: "Update TLS configuration to support the server's required protocol version."
79
+ },
80
+ ERR_TLS_RENEGOTIATION_DISABLED: {
81
+ code: -1005,
82
+ message: "TLS Renegotiation Disabled",
83
+ details: "An attempt at TLS/SSL renegotiation was made, but it is disabled or disallowed by the server configuration.",
84
+ suggestion: "Contact the server administrator if renegotiation is required for your use case."
85
+ },
86
+ ERR_TLS_CERT_SIGNATURE_ALGORITHM_UNSUPPORTED: {
87
+ code: -1006,
88
+ message: "Unsupported Certificate Signature",
89
+ details: "The signature algorithm used in the server's SSL/TLS certificate is not supported or deemed insecure.",
90
+ suggestion: "The server's certificate may need to be updated to use a supported signature algorithm."
91
+ },
92
+ CERT_HAS_EXPIRED: {
93
+ code: -1050,
94
+ message: "Certificate Expired",
95
+ details: "The server's SSL/TLS certificate has expired and is no longer valid.",
96
+ suggestion: "Contact the server administrator to renew the certificate, or set rejectUnauthorized: false for testing only."
97
+ },
98
+ UNABLE_TO_VERIFY_LEAF_SIGNATURE: {
99
+ code: -1051,
100
+ message: "Certificate Verification Failed",
101
+ details: "Unable to verify the server's SSL/TLS certificate chain. The certificate may be self-signed or missing intermediate certificates.",
102
+ suggestion: "Add the certificate to your trust store, or set rejectUnauthorized: false for testing only."
103
+ },
104
+ SELF_SIGNED_CERT_IN_CHAIN: {
105
+ code: -1052,
106
+ message: "Self-Signed Certificate",
107
+ details: "A self-signed certificate was found in the certificate chain. Self-signed certificates are not trusted by default.",
108
+ suggestion: "Add the certificate to your trust store, or set rejectUnauthorized: false for testing only."
109
+ },
110
+ DEPTH_ZERO_SELF_SIGNED_CERT: {
111
+ code: -1053,
112
+ message: "Self-Signed Certificate (No Chain)",
113
+ details: "The server presented a self-signed certificate with no certificate chain.",
114
+ suggestion: "Add the certificate to your trust store, or set rejectUnauthorized: false for testing only."
115
+ },
116
+ ERR_HTTP_HEADERS_SENT: {
117
+ code: -1007,
118
+ message: "Headers Already Sent",
119
+ details: "An attempt was made to send HTTP headers after they had already been sent. This is an application logic error.",
120
+ suggestion: "Review your code to ensure headers are only set once before sending the response."
121
+ },
122
+ ERR_INVALID_ARG_TYPE: {
123
+ code: -1008,
124
+ message: "Invalid Argument Type",
125
+ details: "An argument of an incorrect type was passed to the HTTP request function.",
126
+ suggestion: "Check your request configuration and ensure all values have the correct types."
127
+ },
128
+ ERR_INVALID_URL: {
129
+ code: -1009,
130
+ message: "Invalid URL",
131
+ details: "The provided URL is syntactically invalid or cannot be parsed.",
132
+ suggestion: "Verify the URL format is correct and properly encoded."
133
+ },
134
+ ERR_STREAM_DESTROYED: {
135
+ code: -1010,
136
+ message: "Stream Destroyed",
137
+ details: "The readable/writable stream associated with the request/response was destroyed prematurely.",
138
+ suggestion: "Ensure streams are properly managed and not closed before operations complete."
139
+ },
140
+ ERR_STREAM_PREMATURE_CLOSE: {
141
+ code: -1011,
142
+ message: "Premature Stream Close",
143
+ details: "The server closed the connection before sending the complete response body (e.g., incomplete chunked encoding).",
144
+ suggestion: "This may indicate a server-side issue. Retry the request or contact the server administrator."
145
+ },
146
+ UND_ERR_CONNECT_TIMEOUT: {
147
+ code: -1020,
148
+ message: "Connect Timeout",
149
+ details: "Timeout occurred while waiting for the TCP socket connection to be established.",
150
+ suggestion: "Increase the connection timeout or check network connectivity."
151
+ },
152
+ UND_ERR_HEADERS_TIMEOUT: {
153
+ code: -1021,
154
+ message: "Headers Timeout",
155
+ details: "Timeout occurred while waiting to receive the complete HTTP response headers from the server.",
156
+ suggestion: "Increase the headers timeout or check if the server is responding slowly."
157
+ },
158
+ UND_ERR_SOCKET: {
159
+ code: -1022,
160
+ message: "Socket Error",
161
+ details: "An error occurred at the underlying socket level during the connection.",
162
+ suggestion: "Check network connectivity and firewall settings."
163
+ },
164
+ UND_ERR_INFO: {
165
+ code: -1023,
166
+ message: "Invalid Request Info",
167
+ details: "Internal error related to invalid or missing metadata needed to process the request.",
168
+ suggestion: "Check your request configuration for missing or invalid values."
169
+ },
170
+ UND_ERR_ABORTED: {
171
+ code: -1024,
172
+ message: "Request Aborted",
173
+ details: "The request was explicitly aborted, often due to a timeout signal or user action.",
174
+ suggestion: "If unintended, check your abort controller and timeout settings."
175
+ },
176
+ ABORT_ERR: {
177
+ code: -1025,
178
+ message: "Request Aborted",
179
+ details: "The request was explicitly aborted by the client.",
180
+ suggestion: "If unintended, review your code for abort signal triggers."
181
+ },
182
+ UND_ERR_REQUEST_TIMEOUT: {
183
+ code: -1026,
184
+ message: "Request Timeout",
185
+ details: "The request timed out waiting for a response from the server.",
186
+ suggestion: "Increase the request timeout or check server responsiveness."
187
+ },
188
+ REZ_UNKNOWN_ERROR: {
189
+ code: -9999,
190
+ message: "Unknown Error",
191
+ details: "An unspecified or unrecognized error occurred during the request.",
192
+ suggestion: "Check the error cause for more details. If the issue persists, please report it."
193
+ },
194
+ REZ_FILE_PERMISSION_ERROR: {
195
+ code: -1027,
196
+ message: "File Permission Error",
197
+ details: "Insufficient permissions to read or write a required file.",
198
+ suggestion: "Check file permissions and ensure the application has the necessary access rights."
199
+ },
200
+ REZ_MISSING_REDIRECT_LOCATION: {
201
+ code: -1028,
202
+ message: "Missing Redirect Location",
203
+ details: "The server returned a redirect status code (3xx) but did not include the required Location header.",
204
+ suggestion: "This is a server-side issue. Contact the server administrator."
205
+ },
206
+ REZ_DECOMPRESSION_ERROR: {
207
+ code: -1029,
208
+ message: "Decompression Error",
209
+ details: "Failed to decompress the response body. The data may be corrupt or the encoding may be incorrect.",
210
+ suggestion: "Try disabling automatic decompression with decompress: false."
211
+ },
212
+ REZ_DOWNLOAD_FAILED: {
213
+ code: -1030,
214
+ message: "Download Failed",
215
+ details: "The resource could not be fully downloaded due to an error during data transfer.",
216
+ suggestion: "Check network connectivity and available disk space. Retry the download."
217
+ },
218
+ REZ_HTTP_ERROR: {
219
+ code: -1031,
220
+ message: "HTTP Error",
221
+ details: "The server responded with a non-successful HTTP status code.",
222
+ suggestion: "Check the status code and response body for more details about the error."
223
+ },
224
+ REZ_REDIRECT_DENIED: {
225
+ code: -1032,
226
+ message: "Redirect Denied",
227
+ details: "A redirect response was received, but following redirects is disabled or disallowed by configuration.",
228
+ suggestion: "Enable followRedirects: true if you want to follow redirects automatically."
229
+ },
230
+ REZ_MAX_REDIRECTS_EXCEEDED: {
231
+ code: -1035,
232
+ message: "Maximum Redirects Exceeded",
233
+ details: "The maximum number of allowed redirects has been exceeded. This may indicate a redirect loop.",
234
+ suggestion: "Increase maxRedirects or check for redirect loops on the server."
235
+ },
236
+ REZ_REDIRECT_CYCLE_DETECTED: {
237
+ code: -1036,
238
+ message: "Redirect Cycle Detected",
239
+ details: "A circular redirect loop was detected. The request is being redirected in a cycle.",
240
+ suggestion: "This is a server configuration issue. Contact the server administrator."
241
+ },
242
+ REZ_PROXY_INVALID_PROTOCOL: {
243
+ code: -1033,
244
+ message: "Invalid Proxy Protocol",
245
+ details: "The specified proxy URL has an invalid or unsupported protocol scheme. Supported protocols are: http, https, socks4, socks5.",
246
+ suggestion: "Use a valid proxy URL with http://, https://, socks4://, or socks5:// protocol."
247
+ },
248
+ REZ_PROXY_INVALID_HOSTPORT: {
249
+ code: -1034,
250
+ message: "Invalid Proxy Configuration",
251
+ details: "The hostname or port number provided for the proxy server is invalid or malformed.",
252
+ suggestion: "Verify the proxy host and port are correct. Format: protocol://host:port"
253
+ },
254
+ REZ_PROXY_CONNECTION_FAILED: {
255
+ code: -1044,
256
+ message: "Proxy Connection Failed",
257
+ details: "Failed to establish a connection with the proxy server. The proxy may be down or unreachable.",
258
+ suggestion: "Verify the proxy server is running and accessible. Check host, port, and network connectivity."
259
+ },
260
+ REZ_PROXY_AUTHENTICATION_FAILED: {
261
+ code: -1045,
262
+ message: "Proxy Authentication Failed",
263
+ details: "Authentication with the proxy server failed. The provided credentials were rejected.",
264
+ suggestion: "Verify your proxy username and password are correct."
265
+ },
266
+ REZ_PROXY_TARGET_UNREACHABLE: {
267
+ code: -1046,
268
+ message: "Proxy Target Unreachable",
269
+ details: "The proxy server was unable to connect to the target destination. The target may be blocked or unreachable from the proxy.",
270
+ suggestion: "Verify the target URL is correct and accessible from the proxy server."
271
+ },
272
+ REZ_PROXY_ERROR: {
273
+ code: -1047,
274
+ message: "Proxy Error",
275
+ details: "An unspecified error occurred while communicating with or through the proxy server.",
276
+ suggestion: "Check proxy server logs or try a different proxy."
277
+ },
278
+ REZ_PROXY_TIMEOUT: {
279
+ code: -1048,
280
+ message: "Proxy Timeout",
281
+ details: "The connection through the proxy server timed out before completing.",
282
+ suggestion: "Increase the proxy timeout or check proxy server performance."
283
+ },
284
+ REZ_SOCKS_CONNECTION_FAILED: {
285
+ code: -1040,
286
+ message: "SOCKS Proxy Connection Failed",
287
+ details: "Failed to establish a connection with the SOCKS proxy server. The proxy may be down or unreachable.",
288
+ suggestion: "Verify the SOCKS proxy host, port, and network connectivity."
289
+ },
290
+ REZ_SOCKS_AUTHENTICATION_FAILED: {
291
+ code: -1041,
292
+ message: "SOCKS Proxy Authentication Failed",
293
+ details: "Authentication with the SOCKS5 proxy failed. The credentials were rejected or the authentication method is not supported.",
294
+ suggestion: "Verify your SOCKS proxy username and password. Ensure the proxy supports your authentication method."
295
+ },
296
+ REZ_SOCKS_TARGET_CONNECTION_FAILED: {
297
+ code: -1042,
298
+ message: "SOCKS Proxy Target Unreachable",
299
+ details: "The SOCKS proxy was unable to connect to the final destination. The target may be unreachable from the proxy network.",
300
+ suggestion: "Verify the target URL is correct and accessible from the SOCKS proxy."
301
+ },
302
+ REZ_SOCKS_PROTOCOL_ERROR: {
303
+ code: -1043,
304
+ message: "SOCKS Protocol Error",
305
+ details: "Invalid or malformed response received from the SOCKS proxy during handshake or connection.",
306
+ suggestion: "Ensure the proxy is a valid SOCKS4/SOCKS5 server and supports the required features."
307
+ },
308
+ REZ_SOCKS_UNSUPPORTED_VERSION: {
309
+ code: -1049,
310
+ message: "SOCKS Version Not Supported",
311
+ details: "The SOCKS proxy version is not supported. Only SOCKS4 and SOCKS5 are supported.",
312
+ suggestion: "Use a SOCKS4 or SOCKS5 proxy server."
313
+ },
314
+ REZ_UPLOAD_FAILED: {
315
+ code: -1060,
316
+ message: "Upload Failed",
317
+ details: "The file upload could not be completed due to an error during data transfer.",
318
+ suggestion: "Check network connectivity and try again. Verify the server accepts the file type and size."
319
+ },
320
+ REZ_STREAM_ERROR: {
321
+ code: -1061,
322
+ message: "Stream Error",
323
+ details: "An error occurred while processing the response stream.",
324
+ suggestion: "Retry the request. If persistent, the server may be returning malformed data."
325
+ },
326
+ REZ_BODY_TOO_LARGE: {
327
+ code: -1062,
328
+ message: "Request Body Too Large",
329
+ details: "The request body exceeds the maximum allowed size.",
330
+ suggestion: "Reduce the size of the request body or increase maxBodyLength."
331
+ },
332
+ REZ_RESPONSE_TOO_LARGE: {
333
+ code: -1063,
334
+ message: "Response Too Large",
335
+ details: "The response body exceeds the maximum allowed size for buffering.",
336
+ suggestion: "Use streaming mode for large responses with rezo.stream()."
337
+ },
338
+ REZ_INVALID_JSON: {
339
+ code: -1064,
340
+ message: "Invalid JSON Response",
341
+ details: "Failed to parse the response body as JSON. The server returned invalid JSON data.",
342
+ suggestion: "Check the response Content-Type header and response body. Use responseType: 'text' to get raw response."
343
+ },
344
+ REZ_RATE_LIMITED: {
345
+ code: -1065,
346
+ message: "Rate Limited",
347
+ details: "The server has rate-limited your requests. Too many requests were sent in a short period.",
348
+ suggestion: "Implement request throttling or wait before retrying. Check the Retry-After header if available."
349
+ }
350
+ };
351
+ var RezoErrorCode; exports.RezoErrorCode = RezoErrorCode;
352
+ ((RezoErrorCode) => {
353
+ RezoErrorCode["CONNECTION_REFUSED"] = "ECONNREFUSED";
354
+ RezoErrorCode["CONNECTION_RESET"] = "ECONNRESET";
355
+ RezoErrorCode["CONNECTION_TIMEOUT"] = "ETIMEDOUT";
356
+ RezoErrorCode["DNS_LOOKUP_FAILED"] = "ENOTFOUND";
357
+ RezoErrorCode["DNS_TEMPORARY_FAILURE"] = "EAI_AGAIN";
358
+ RezoErrorCode["HOST_UNREACHABLE"] = "EHOSTUNREACH";
359
+ RezoErrorCode["NETWORK_UNREACHABLE"] = "ENETUNREACH";
360
+ RezoErrorCode["BROKEN_PIPE"] = "EPIPE";
361
+ RezoErrorCode["HTTP_ERROR"] = "REZ_HTTP_ERROR";
362
+ RezoErrorCode["REDIRECT_DENIED"] = "REZ_REDIRECT_DENIED";
363
+ RezoErrorCode["MAX_REDIRECTS"] = "REZ_MAX_REDIRECTS_EXCEEDED";
364
+ RezoErrorCode["REDIRECT_CYCLE"] = "REZ_REDIRECT_CYCLE_DETECTED";
365
+ RezoErrorCode["MISSING_REDIRECT_LOCATION"] = "REZ_MISSING_REDIRECT_LOCATION";
366
+ RezoErrorCode["DECOMPRESSION_ERROR"] = "REZ_DECOMPRESSION_ERROR";
367
+ RezoErrorCode["REQUEST_TIMEOUT"] = "UND_ERR_REQUEST_TIMEOUT";
368
+ RezoErrorCode["HEADERS_TIMEOUT"] = "UND_ERR_HEADERS_TIMEOUT";
369
+ RezoErrorCode["CONNECT_TIMEOUT"] = "UND_ERR_CONNECT_TIMEOUT";
370
+ RezoErrorCode["ABORTED"] = "ABORT_ERR";
371
+ RezoErrorCode["DOWNLOAD_FAILED"] = "REZ_DOWNLOAD_FAILED";
372
+ RezoErrorCode["UPLOAD_FAILED"] = "REZ_UPLOAD_FAILED";
373
+ RezoErrorCode["STREAM_ERROR"] = "REZ_STREAM_ERROR";
374
+ RezoErrorCode["BODY_TOO_LARGE"] = "REZ_BODY_TOO_LARGE";
375
+ RezoErrorCode["RESPONSE_TOO_LARGE"] = "REZ_RESPONSE_TOO_LARGE";
376
+ RezoErrorCode["INVALID_JSON"] = "REZ_INVALID_JSON";
377
+ RezoErrorCode["INVALID_URL"] = "ERR_INVALID_URL";
378
+ RezoErrorCode["INVALID_PROTOCOL"] = "ERR_INVALID_PROTOCOL";
379
+ RezoErrorCode["INVALID_ARGUMENT"] = "ERR_INVALID_ARG_TYPE";
380
+ RezoErrorCode["FILE_PERMISSION"] = "REZ_FILE_PERMISSION_ERROR";
381
+ RezoErrorCode["PROXY_CONNECTION_FAILED"] = "REZ_PROXY_CONNECTION_FAILED";
382
+ RezoErrorCode["PROXY_AUTH_FAILED"] = "REZ_PROXY_AUTHENTICATION_FAILED";
383
+ RezoErrorCode["PROXY_TARGET_UNREACHABLE"] = "REZ_PROXY_TARGET_UNREACHABLE";
384
+ RezoErrorCode["PROXY_TIMEOUT"] = "REZ_PROXY_TIMEOUT";
385
+ RezoErrorCode["PROXY_ERROR"] = "REZ_PROXY_ERROR";
386
+ RezoErrorCode["PROXY_INVALID_PROTOCOL"] = "REZ_PROXY_INVALID_PROTOCOL";
387
+ RezoErrorCode["PROXY_INVALID_CONFIG"] = "REZ_PROXY_INVALID_HOSTPORT";
388
+ RezoErrorCode["SOCKS_CONNECTION_FAILED"] = "REZ_SOCKS_CONNECTION_FAILED";
389
+ RezoErrorCode["SOCKS_AUTH_FAILED"] = "REZ_SOCKS_AUTHENTICATION_FAILED";
390
+ RezoErrorCode["SOCKS_TARGET_UNREACHABLE"] = "REZ_SOCKS_TARGET_CONNECTION_FAILED";
391
+ RezoErrorCode["SOCKS_PROTOCOL_ERROR"] = "REZ_SOCKS_PROTOCOL_ERROR";
392
+ RezoErrorCode["SOCKS_UNSUPPORTED_VERSION"] = "REZ_SOCKS_UNSUPPORTED_VERSION";
393
+ RezoErrorCode["TLS_HANDSHAKE_TIMEOUT"] = "ERR_TLS_HANDSHAKE_TIMEOUT";
394
+ RezoErrorCode["TLS_PROTOCOL_ERROR"] = "EPROTO";
395
+ RezoErrorCode["TLS_PROTOCOL_VERSION"] = "ERR_TLS_INVALID_PROTOCOL_VERSION";
396
+ RezoErrorCode["CERTIFICATE_HOSTNAME_MISMATCH"] = "ERR_TLS_CERT_ALTNAME_INVALID";
397
+ RezoErrorCode["CERTIFICATE_EXPIRED"] = "CERT_HAS_EXPIRED";
398
+ RezoErrorCode["CERTIFICATE_SELF_SIGNED"] = "SELF_SIGNED_CERT_IN_CHAIN";
399
+ RezoErrorCode["CERTIFICATE_VERIFY_FAILED"] = "UNABLE_TO_VERIFY_LEAF_SIGNATURE";
400
+ RezoErrorCode["RATE_LIMITED"] = "REZ_RATE_LIMITED";
401
+ RezoErrorCode["UNKNOWN_ERROR"] = "REZ_UNKNOWN_ERROR";
402
+ })(RezoErrorCode ||= {});
403
+ function getHttpErrorMessage(statusCode) {
404
+ const statusMessages = {
405
+ 400: "Bad Request: The server cannot process the request due to invalid syntax.",
406
+ 401: "Unauthorized: Authentication is required and has failed or has not been provided.",
407
+ 403: "Forbidden: The server understood the request but refuses to authorize it.",
408
+ 404: "Not Found: The requested resource could not be found on the server.",
409
+ 405: "Method Not Allowed: The request method is not supported for the requested resource.",
410
+ 408: "Request Timeout: The server timed out waiting for the request.",
411
+ 409: "Conflict: The request conflicts with the current state of the server.",
412
+ 410: "Gone: The requested resource is no longer available and will not be available again.",
413
+ 413: "Payload Too Large: The request entity is larger than limits defined by server.",
414
+ 414: "URI Too Long: The URI requested by the client is longer than the server can interpret.",
415
+ 415: "Unsupported Media Type: The media format of the requested data is not supported.",
416
+ 422: "Unprocessable Entity: The request was well-formed but contains semantic errors.",
417
+ 429: "Too Many Requests: The user has sent too many requests in a given amount of time.",
418
+ 500: "Internal Server Error: The server has encountered an unexpected condition.",
419
+ 501: "Not Implemented: The server does not support the functionality required to fulfill the request.",
420
+ 502: "Bad Gateway: The server received an invalid response from the upstream server.",
421
+ 503: "Service Unavailable: The server is currently unavailable (overloaded or down).",
422
+ 504: "Gateway Timeout: The server did not receive a timely response from the upstream server.",
423
+ 505: "HTTP Version Not Supported: The HTTP version used in the request is not supported."
424
+ };
425
+ return statusMessages[statusCode] || `HTTP Error ${statusCode}: The server responded with a non-successful status code.`;
426
+ }
427
+ function getCode(code) {
428
+ const error = ERROR_INFO[code];
429
+ if (error) {
430
+ return {
431
+ message: error.message,
432
+ details: error.details,
433
+ suggestion: error.suggestion,
434
+ errno: error.code
435
+ };
436
+ } else {
437
+ const unknownError = ERROR_INFO["REZ_UNKNOWN_ERROR"];
438
+ return {
439
+ message: unknownError.message,
440
+ details: unknownError.details,
441
+ suggestion: unknownError.suggestion,
442
+ errno: unknownError.code
443
+ };
444
+ }
445
+ }
446
+ function getErrorInfo(code) {
447
+ return getCode(code);
448
+ }
449
+ function shouldFilterStackLine(line) {
450
+ if (!line.trim().startsWith("at "))
451
+ return false;
452
+ if (line.includes("/node_modules/socks/"))
453
+ return true;
454
+ if (line.includes("/node_modules/socks-proxy-agent/"))
455
+ return true;
456
+ if (line.includes("/node_modules/http-proxy-agent/"))
457
+ return true;
458
+ if (line.includes("/node_modules/https-proxy-agent/"))
459
+ return true;
460
+ if (line.includes("/node_modules/agent-base/"))
461
+ return true;
462
+ if (line.includes("/src/adapters/"))
463
+ return true;
464
+ if (line.includes("/src/responses/"))
465
+ return true;
466
+ if (line.includes("/src/errors/"))
467
+ return true;
468
+ if (line.includes("/src/core/"))
469
+ return true;
470
+ if (line.includes("/src/utils/"))
471
+ return true;
472
+ if (line.includes("/src/proxy/"))
473
+ return true;
474
+ if (line.includes("node:internal/"))
475
+ return true;
476
+ if (line.includes("node:_http"))
477
+ return true;
478
+ if (line.includes("node:events"))
479
+ return true;
480
+ if (line.includes("node:net"))
481
+ return true;
482
+ if (line.includes("node:tls"))
483
+ return true;
484
+ if (line.includes("node:stream"))
485
+ return true;
486
+ return false;
487
+ }
488
+ function maskPathInLine(line) {
489
+ return line.replace(/\(\/[^)]+\/([^/)]+:[0-9]+:[0-9]+)\)/g, "($1)").replace(/at \/[^\s]+\/([^\s]+:[0-9]+:[0-9]+)/g, "at $1");
490
+ }
491
+ function cleanStackTrace(stack) {
492
+ if (!stack)
493
+ return;
494
+ const lines = stack.split(`
495
+ `);
496
+ const cleanedLines = [];
497
+ let userFrameCount = 0;
498
+ const maxUserFrames = 5;
499
+ for (const line of lines) {
500
+ if (!line.trim().startsWith("at ")) {
501
+ cleanedLines.push(line);
502
+ continue;
503
+ }
504
+ if (shouldFilterStackLine(line)) {
505
+ continue;
506
+ }
507
+ if (userFrameCount < maxUserFrames) {
508
+ cleanedLines.push(maskPathInLine(line));
509
+ userFrameCount++;
510
+ }
511
+ }
512
+ if (cleanedLines.length === 0) {
513
+ return lines[0] || undefined;
514
+ }
515
+ return cleanedLines.join(`
516
+ `);
517
+ }
518
+
519
+ class RezoError extends Error {
520
+ constructor(message, config, code, request, response) {
521
+ super();
522
+ Object.defineProperty(this, "config", { value: config, enumerable: false });
523
+ Object.defineProperty(this, "request", { value: request, enumerable: false });
524
+ Object.defineProperty(this, "response", { value: response, enumerable: false });
525
+ Object.defineProperty(this, "isRezoError", { value: true, enumerable: false });
526
+ if (code) {
527
+ Object.defineProperty(this, "code", { value: code, enumerable: true });
528
+ }
529
+ const timeoutCodes = ["ETIMEDOUT", "UND_ERR_CONNECT_TIMEOUT", "UND_ERR_HEADERS_TIMEOUT", "UND_ERR_REQUEST_TIMEOUT", "ERR_TLS_HANDSHAKE_TIMEOUT", "REZ_PROXY_TIMEOUT"];
530
+ const abortCodes = ["ABORT_ERR", "UND_ERR_ABORTED"];
531
+ const networkCodes = ["ECONNREFUSED", "ECONNRESET", "ENOTFOUND", "EAI_AGAIN", "EPIPE", "EHOSTUNREACH", "ENETUNREACH", "UND_ERR_SOCKET"];
532
+ const proxyCodes = ["REZ_PROXY_CONNECTION_FAILED", "REZ_PROXY_AUTHENTICATION_FAILED", "REZ_PROXY_TARGET_UNREACHABLE", "REZ_PROXY_ERROR", "REZ_PROXY_TIMEOUT", "REZ_PROXY_INVALID_PROTOCOL", "REZ_PROXY_INVALID_HOSTPORT"];
533
+ const socksCodes = ["REZ_SOCKS_CONNECTION_FAILED", "REZ_SOCKS_AUTHENTICATION_FAILED", "REZ_SOCKS_TARGET_CONNECTION_FAILED", "REZ_SOCKS_PROTOCOL_ERROR", "REZ_SOCKS_UNSUPPORTED_VERSION"];
534
+ const tlsCodes = ["EPROTO", "ERR_TLS_CERT_ALTNAME_INVALID", "ERR_TLS_HANDSHAKE_TIMEOUT", "ERR_TLS_INVALID_PROTOCOL_VERSION", "ERR_TLS_RENEGOTIATION_DISABLED", "ERR_TLS_CERT_SIGNATURE_ALGORITHM_UNSUPPORTED", "CERT_HAS_EXPIRED", "UNABLE_TO_VERIFY_LEAF_SIGNATURE", "SELF_SIGNED_CERT_IN_CHAIN", "DEPTH_ZERO_SELF_SIGNED_CERT"];
535
+ const retryableCodes = [...timeoutCodes, "ECONNRESET", "ECONNREFUSED", "EAI_AGAIN", "REZ_RATE_LIMITED"];
536
+ Object.defineProperty(this, "isTimeout", { value: code ? timeoutCodes.includes(code) : false, enumerable: false });
537
+ Object.defineProperty(this, "isAborted", { value: code ? abortCodes.includes(code) : false, enumerable: false });
538
+ Object.defineProperty(this, "isNetworkError", { value: code ? networkCodes.includes(code) : false, enumerable: false });
539
+ Object.defineProperty(this, "isHttpError", { value: code === "REZ_HTTP_ERROR", enumerable: false });
540
+ Object.defineProperty(this, "isProxyError", { value: code ? proxyCodes.includes(code) : false, enumerable: false });
541
+ Object.defineProperty(this, "isSocksError", { value: code ? socksCodes.includes(code) : false, enumerable: false });
542
+ Object.defineProperty(this, "isTlsError", { value: code ? tlsCodes.includes(code) : false, enumerable: false });
543
+ Object.defineProperty(this, "isRetryable", { value: code ? retryableCodes.includes(code) || code === "REZ_HTTP_ERROR" : false, enumerable: false });
544
+ if (code) {
545
+ const errorInfo = getCode(code);
546
+ Object.defineProperty(this, "errno", { value: errorInfo.errno, enumerable: false });
547
+ Object.defineProperty(this, "details", { value: errorInfo.details, enumerable: false });
548
+ Object.defineProperty(this, "suggestion", { value: errorInfo.suggestion, enumerable: false });
549
+ this.message = errorInfo.message;
550
+ } else {
551
+ this.message = message;
552
+ Object.defineProperty(this, "details", { value: message, enumerable: false });
553
+ Object.defineProperty(this, "suggestion", { value: "Check the error details for more information.", enumerable: false });
554
+ }
555
+ if (response) {
556
+ Object.defineProperty(this, "status", { value: response.status, enumerable: false });
557
+ Object.defineProperty(this, "statusText", { value: response.statusText, enumerable: false });
558
+ }
559
+ this.name = this.constructor.name;
560
+ Object.setPrototypeOf(this, RezoError.prototype);
561
+ if (Error.captureStackTrace) {
562
+ Error.captureStackTrace(this, this.constructor);
563
+ }
564
+ if (this.stack) {
565
+ const cleaned = cleanStackTrace(this.stack);
566
+ if (cleaned) {
567
+ Object.defineProperty(this, "stack", { value: cleaned, enumerable: false, writable: true });
568
+ }
569
+ }
570
+ }
571
+ [Symbol.for("nodejs.util.inspect.custom")](_depth, _options) {
572
+ const parts = [];
573
+ parts.push(`${this.name}: ${this.message}`);
574
+ if (this.code) {
575
+ parts.push(` code: '${this.code}'`);
576
+ }
577
+ if (this.details && this.details !== this.message) {
578
+ parts.push(` details: ${this.details}`);
579
+ }
580
+ if (this.suggestion) {
581
+ parts.push(` suggestion: ${this.suggestion}`);
582
+ }
583
+ return parts.join(`
584
+ `);
585
+ }
586
+ static isRezoError(error) {
587
+ return error instanceof RezoError || error !== null && typeof error === "object" && error.isRezoError === true;
588
+ }
589
+ static fromError(error, config, request, response) {
590
+ const code = "code" in error ? error.code : undefined;
591
+ const rezoError = new RezoError(error.message, config, code, request, response);
592
+ Object.defineProperty(rezoError, "cause", { value: error, enumerable: false });
593
+ const cleaned = cleanStackTrace(error.stack);
594
+ if (cleaned) {
595
+ Object.defineProperty(rezoError, "stack", { value: cleaned, enumerable: false });
596
+ }
597
+ if ("syscall" in error) {
598
+ Object.defineProperty(rezoError, "syscall", { value: error.syscall, enumerable: false });
599
+ }
600
+ if ("hostname" in error) {
601
+ Object.defineProperty(rezoError, "hostname", { value: error.hostname, enumerable: false });
602
+ }
603
+ if ("port" in error) {
604
+ Object.defineProperty(rezoError, "port", { value: error.port, enumerable: false });
605
+ }
606
+ if ("address" in error) {
607
+ Object.defineProperty(rezoError, "address", { value: error.address, enumerable: false });
608
+ }
609
+ return rezoError;
610
+ }
611
+ static createNetworkError(message, code, config, request) {
612
+ return new RezoError(message, config, code, request);
613
+ }
614
+ static createHttpError(statusCode, config, request, response) {
615
+ const error = new RezoError(getHttpErrorMessage(statusCode), config, "REZ_HTTP_ERROR", request, response);
616
+ Object.defineProperty(error, "status", { value: statusCode, enumerable: false });
617
+ return error;
618
+ }
619
+ static createTimeoutError(message, config, request) {
620
+ return new RezoError(message, config, "ETIMEDOUT", request);
621
+ }
622
+ static createAbortError(message, config, request) {
623
+ return new RezoError(message, config, "ABORT_ERR", request);
624
+ }
625
+ static createParsingError(message, config, request) {
626
+ return new RezoError(message, config, "REZ_INVALID_JSON", request);
627
+ }
628
+ static createEnvironmentError(message, config) {
629
+ return new RezoError(message, config, "REZ_UNKNOWN_ERROR");
630
+ }
631
+ static createDecompressionError(message, config, request, response) {
632
+ return new RezoError(message, config, "REZ_DECOMPRESSION_ERROR", request, response);
633
+ }
634
+ static createDownloadError(message, config, request, response) {
635
+ return new RezoError(message, config, "REZ_DOWNLOAD_FAILED", request, response);
636
+ }
637
+ static createUploadError(message, config, request, response) {
638
+ return new RezoError(message, config, "REZ_UPLOAD_FAILED", request, response);
639
+ }
640
+ static createStreamError(message, config, request, response) {
641
+ return new RezoError(message, config, "REZ_STREAM_ERROR", request, response);
642
+ }
643
+ static createRedirectError(message, config, request, response) {
644
+ return new RezoError(message, config, "REZ_MISSING_REDIRECT_LOCATION", request, response);
645
+ }
646
+ static createProxyError(code, config, request) {
647
+ const validCodes = ["REZ_PROXY_CONNECTION_FAILED", "REZ_PROXY_AUTHENTICATION_FAILED", "REZ_PROXY_TARGET_UNREACHABLE", "REZ_PROXY_ERROR", "REZ_PROXY_TIMEOUT", "REZ_PROXY_INVALID_PROTOCOL", "REZ_PROXY_INVALID_HOSTPORT"];
648
+ const errorCode = validCodes.includes(code) ? code : "REZ_PROXY_ERROR";
649
+ return new RezoError("Proxy error", config, errorCode, request);
650
+ }
651
+ static createSocksError(code, config, request) {
652
+ const validCodes = ["REZ_SOCKS_CONNECTION_FAILED", "REZ_SOCKS_AUTHENTICATION_FAILED", "REZ_SOCKS_TARGET_CONNECTION_FAILED", "REZ_SOCKS_PROTOCOL_ERROR", "REZ_SOCKS_UNSUPPORTED_VERSION"];
653
+ const errorCode = validCodes.includes(code) ? code : "REZ_SOCKS_CONNECTION_FAILED";
654
+ return new RezoError("SOCKS proxy error", config, errorCode, request);
655
+ }
656
+ static createTlsError(code, config, request) {
657
+ const validCodes = ["EPROTO", "ERR_TLS_CERT_ALTNAME_INVALID", "ERR_TLS_HANDSHAKE_TIMEOUT", "ERR_TLS_INVALID_PROTOCOL_VERSION", "CERT_HAS_EXPIRED", "UNABLE_TO_VERIFY_LEAF_SIGNATURE", "SELF_SIGNED_CERT_IN_CHAIN", "DEPTH_ZERO_SELF_SIGNED_CERT"];
658
+ const errorCode = validCodes.includes(code) ? code : "EPROTO";
659
+ return new RezoError("TLS/SSL error", config, errorCode, request);
660
+ }
661
+ static createRateLimitError(config, request, response) {
662
+ const error = new RezoError("Rate limited", config, "REZ_RATE_LIMITED", request, response);
663
+ Object.defineProperty(error, "status", { value: 429, enumerable: false });
664
+ return error;
665
+ }
666
+ toJSON() {
667
+ const result = {
668
+ name: this.name,
669
+ message: this.message
670
+ };
671
+ if (this.code !== undefined)
672
+ result.code = this.code;
673
+ if (this.details !== undefined)
674
+ result.details = this.details;
675
+ if (this.suggestion !== undefined)
676
+ result.suggestion = this.suggestion;
677
+ if (this.status !== undefined)
678
+ result.status = this.status;
679
+ if (this.statusText !== undefined)
680
+ result.statusText = this.statusText;
681
+ return result;
682
+ }
683
+ toString() {
684
+ let result = `${this.name}: ${this.message}`;
685
+ if (this.code) {
686
+ result += ` [${this.code}]`;
687
+ }
688
+ return result;
689
+ }
690
+ getFullDetails() {
691
+ let result = `${this.name}: ${this.message}
692
+ `;
693
+ result += `
694
+ Details: ${this.details}
695
+ `;
696
+ result += `Suggestion: ${this.suggestion}
697
+ `;
698
+ if (this.code)
699
+ result += `Code: ${this.code}
700
+ `;
701
+ if (this.errno)
702
+ result += `Error Number: ${this.errno}
703
+ `;
704
+ if (this.status)
705
+ result += `HTTP Status: ${this.status} ${this.statusText || ""}
706
+ `;
707
+ if (this.hostname)
708
+ result += `Host: ${this.hostname}
709
+ `;
710
+ if (this.port)
711
+ result += `Port: ${this.port}
712
+ `;
713
+ return result;
714
+ }
715
+ }
716
+
717
+ exports.getHttpErrorMessage = getHttpErrorMessage;
718
+ exports.getCode = getCode;
719
+ exports.getErrorInfo = getErrorInfo;
720
+ exports.RezoError = RezoError;
721
+ exports.default = RezoError;
722
+ module.exports = Object.assign(RezoError, exports);