npm package diff
Package: @forge/api
Versions: 6.0.3 - 6.1.0-next.0
File: package/out/api/errors.js
Index: package/out/api/errors.js
===================================================================
--- package/out/api/errors.js
+++ package/out/api/errors.js
@@ -1,12 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.ProxyRequestError = exports.InvalidRemoteError = exports.NeedsAuthenticationError = exports.InvalidWorkspaceRequestedError = exports.RequestProductNotAllowedError = exports.ProductEndpointNotAllowedError = exports.ExternalEndpointNotAllowedError = exports.NotAllowedError = exports.FetchError = exports.HttpError = exports.isExpectedError = exports.isHostedCodeError = exports.isForgePlatformError = exports.PROXY_ERR = exports.INVALID_REMOTE_ERR = exports.NEEDS_AUTHENTICATION_ERR = exports.FUNCTION_FETCH_ERR = exports.REQUEST_EGRESS_ALLOWLIST_ERR = exports.FUNCTION_ERR = void 0;
+exports.ProxyRequestError = exports.InvalidContainerServiceError = exports.InvalidRemoteError = exports.NeedsAuthenticationError = exports.InvalidWorkspaceRequestedError = exports.RequestProductNotAllowedError = exports.ProductEndpointNotAllowedError = exports.ExternalEndpointNotAllowedError = exports.NotAllowedError = exports.FetchError = exports.HttpError = exports.isExpectedError = exports.isHostedCodeError = exports.isForgePlatformError = exports.PROXY_ERR = exports.INVALID_CONTAINER_SERVICE_ERR = exports.INVALID_REMOTE_ERR = exports.NEEDS_AUTHENTICATION_ERR = exports.FUNCTION_FETCH_ERR = exports.REQUEST_EGRESS_ALLOWLIST_ERR = exports.FUNCTION_ERR = void 0;
exports.FUNCTION_ERR = 'FUNCTION_ERR';
exports.REQUEST_EGRESS_ALLOWLIST_ERR = 'REQUEST_EGRESS_ALLOWLIST_ERR';
exports.FUNCTION_FETCH_ERR = 'FUNCTION_FETCH_ERR';
exports.NEEDS_AUTHENTICATION_ERR = 'NEEDS_AUTHENTICATION_ERR';
exports.INVALID_REMOTE_ERR = 'INVALID_REMOTE_ERR';
+exports.INVALID_CONTAINER_SERVICE_ERR = 'INVALID_CONTAINER_SERVICE_ERR';
exports.PROXY_ERR = 'PROXY_ERR';
function isForgePlatformError(err) {
return [exports.REQUEST_EGRESS_ALLOWLIST_ERR, exports.FUNCTION_FETCH_ERR, exports.NEEDS_AUTHENTICATION_ERR, exports.PROXY_ERR].includes(err.name);
}
@@ -89,8 +90,18 @@
this.status = 400;
}
}
exports.InvalidRemoteError = InvalidRemoteError;
+class InvalidContainerServiceError extends HttpError {
+ serviceKey;
+ constructor(error, serviceKey) {
+ super(error);
+ this.serviceKey = serviceKey;
+ this.name = exports.INVALID_CONTAINER_SERVICE_ERR;
+ this.status = 400;
+ }
+}
+exports.InvalidContainerServiceError = InvalidContainerServiceError;
class ProxyRequestError extends HttpError {
status;
errorCode;
constructor(status, errorCode) {