@distilled.cloud/vanta 1.0.0-rc.19 → 1.0.0-rc.20
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/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/errors.d.ts +5 -8
- package/lib/errors.d.ts.map +1 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/auditor_api.js +65 -65
- package/lib/services/auditor_api.js.map +1 -1
- package/lib/services/build_integrations.js +45 -45
- package/lib/services/build_integrations.js.map +1 -1
- package/lib/services/manage_vanta.js +399 -399
- package/lib/services/manage_vanta.js.map +1 -1
- package/lib/services/webhooks.js +31 -31
- package/lib/services/webhooks.js.map +1 -1
- package/lib/services.lazy/build_integrations.js +1 -1
- package/lib/services.lazy/manage_vanta.js +1 -1
- package/package.json +2 -2
- package/src/errors.ts +5 -5
- package/src/protocol.ts +2 -7
package/src/protocol.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as API from "@distilled.cloud/core/api";
|
|
2
2
|
import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
|
|
3
|
-
import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
|
|
3
|
+
import { makeRestProtocol, unknownErrorProps } from "@distilled.cloud/core/protocol-rest";
|
|
4
4
|
import type { SdkError } from "@distilled.cloud/core/sdk-error";
|
|
5
5
|
/**
|
|
6
6
|
* VantaProtocol -- hand-written.
|
|
@@ -53,11 +53,6 @@ export const VantaProtocol: Layer.Layer<API.Protocol> = /*@__PURE__*/ makeRestPr
|
|
|
53
53
|
}),
|
|
54
54
|
// Vanta's error body is `{ code?: string, message?: string }` -- the
|
|
55
55
|
// factory's default lenient envelope covers it.
|
|
56
|
-
unknownError: (
|
|
57
|
-
new UnknownVantaError({
|
|
58
|
-
code: typeof code === "string" ? code : code !== undefined ? String(code) : undefined,
|
|
59
|
-
message,
|
|
60
|
-
body,
|
|
61
|
-
}),
|
|
56
|
+
unknownError: (info) => new UnknownVantaError(unknownErrorProps(info)),
|
|
62
57
|
parseError: ({ body, cause }) => new VantaParseError({ body, cause }),
|
|
63
58
|
});
|