@tim-smart/openapi-gen 1.0.1 → 1.0.2
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/main.js +7 -5
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -17270,28 +17270,30 @@ var commonSource = `const unexpectedStatus = (response: HttpClientResponse.HttpC
|
|
|
17270
17270
|
f,
|
|
17271
17271
|
)
|
|
17272
17272
|
: (f) => (request) => Effect.flatMap(httpClient.execute(request), f)`;
|
|
17273
|
-
var clientErrorSource = (name2) => `export interface ${name2}Error<Tag extends string, E> {
|
|
17273
|
+
var clientErrorSource = (name2) => `export interface ${name2}Error<Tag extends string, E> extends Error {
|
|
17274
17274
|
readonly _tag: Tag
|
|
17275
17275
|
readonly request: HttpClientRequest.HttpClientRequest
|
|
17276
17276
|
readonly response: HttpClientResponse.HttpClientResponse
|
|
17277
|
-
readonly
|
|
17277
|
+
readonly data: E
|
|
17278
17278
|
}
|
|
17279
17279
|
|
|
17280
17280
|
class ${name2}ErrorImpl extends Data.Error<{
|
|
17281
17281
|
_tag: string
|
|
17282
|
-
|
|
17282
|
+
data: any
|
|
17283
17283
|
request: HttpClientRequest.HttpClientRequest
|
|
17284
17284
|
response: HttpClientResponse.HttpClientResponse
|
|
17285
|
+
cause: unknown
|
|
17285
17286
|
}> {}
|
|
17286
17287
|
|
|
17287
17288
|
export const ${name2}Error = <Tag extends string, E>(
|
|
17288
17289
|
tag: Tag,
|
|
17289
|
-
|
|
17290
|
+
data: E,
|
|
17290
17291
|
response: HttpClientResponse.HttpClientResponse,
|
|
17291
17292
|
): ${name2}Error<Tag, E> =>
|
|
17292
17293
|
new ${name2}ErrorImpl({
|
|
17293
17294
|
_tag: tag,
|
|
17294
|
-
|
|
17295
|
+
data,
|
|
17296
|
+
cause: new Error(JSON.stringify(data)),
|
|
17295
17297
|
response,
|
|
17296
17298
|
request: response.request,
|
|
17297
17299
|
}) as any`;
|