/* * © 2024 Snyk Limited * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnsupportedAlpineDistroError = exports.UnsupportedContainerVendorError = exports.UndefinedContainerVendorError = exports.UnsupportedDebianDistroError = exports.UndefinedContainerDistroError = exports.TooManyIssuesError = exports.TooManyPurlsError = exports.InvalidPaginationParametersError = exports.InternalServerError = exports.VulndbNextError = exports.VulnDBInvalidResponseError = exports.VulnerabilityServiceUnavailableError = exports.PackageNotFoundError = exports.ComponentNotSupportedError = exports.MissingComponentError = exports.UnsupportedEcosystemError = exports.NamespaceNotProvidedError = exports.InvalidPurlError = exports.AuthorizationRequestFailureError = exports.OrganizationNotWhitelistedError = void 0; const types_1 = require("../types"); const problem_error_1 = require("../problem-error"); /** * @class * @name OrganizationNotWhitelistedError * @description You likely don’t have access to the features in Beta. To get access, you can request access to features in Beta through your account manager or team. * @summary Your Organisation is not authorized to perform this action * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class OrganizationNotWhitelistedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Your Organisation is not authorized to perform this action', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-1040', status: 403, description: `You likely don’t have access to the features in Beta. To get access, you can request access to features in Beta through your account manager or team.`, errorCode: 'SNYK-OSSI-1040', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.OrganizationNotWhitelistedError = OrganizationNotWhitelistedError; /** * @class * @name AuthorizationRequestFailureError * @description Unexpected error when authenticating. Try again, and if the error still occurs, contact support. * @summary Authorization request failure * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class AuthorizationRequestFailureError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Authorization request failure', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-1050', status: 500, description: `Unexpected error when authenticating. Try again, and if the error still occurs, contact support.`, errorCode: 'SNYK-OSSI-1050', level: 'fatal', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.AuthorizationRequestFailureError = AuthorizationRequestFailureError; /** * @class * @name InvalidPurlError * @description Make sure that the purl is valid. See the Package URL specification link for further information. * * See more: * - [https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst) * @summary Invalid purl * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InvalidPurlError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Invalid purl', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2010', status: 400, description: `Make sure that the purl is valid. See the Package URL specification link for further information.`, errorCode: 'SNYK-OSSI-2010', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InvalidPurlError = InvalidPurlError; /** * @class * @name NamespaceNotProvidedError * @description You have requested a package type that requires a namespace (e.g. maven group id). Provide the namespace to retrieve the package. * * See more: * - [https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst) * @summary Namespace not specified * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NamespaceNotProvidedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Namespace not specified', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2011', status: 400, description: `You have requested a package type that requires a namespace (e.g. maven group id). Provide the namespace to retrieve the package.`, errorCode: 'SNYK-OSSI-2011', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NamespaceNotProvidedError = NamespaceNotProvidedError; /** * @class * @name UnsupportedEcosystemError * @description The package type is not supported. Check the List issues for a package in Snyk API. * @summary Unsupported ecosystem * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedEcosystemError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported ecosystem', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2020', status: 400, description: `The package type is not supported. Check the List issues for a package in Snyk API.`, errorCode: 'SNYK-OSSI-2020', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedEcosystemError = UnsupportedEcosystemError; /** * @class * @name MissingComponentError * @description A list of components of the purl spec is required. The purl did not specify all the required components. Please add the missing components to the purl and try again. * @summary Purl components required * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingComponentError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Purl components required', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2021', status: 400, description: `A list of components of the purl spec is required. The purl did not specify all the required components. Please add the missing components to the purl and try again.`, errorCode: 'SNYK-OSSI-2021', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingComponentError = MissingComponentError; /** * @class * @name ComponentNotSupportedError * @description Remove the unsupported component and retry the request. * @summary Unsupported purl components * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class ComponentNotSupportedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported purl components', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2022', status: 400, description: `Remove the unsupported component and retry the request.`, errorCode: 'SNYK-OSSI-2022', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.ComponentNotSupportedError = ComponentNotSupportedError; /** * @class * @name PackageNotFoundError * @description The package you specified in the purl cannot be found in the vulnerability database. Check the package name, ecosystem, and version, then try again. * @summary Requested package not found * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PackageNotFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Requested package not found', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2030', status: 404, description: `The package you specified in the purl cannot be found in the vulnerability database. Check the package name, ecosystem, and version, then try again.`, errorCode: 'SNYK-OSSI-2030', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PackageNotFoundError = PackageNotFoundError; /** * @class * @name VulnerabilityServiceUnavailableError * @description This issue is unexpected, and the service will recover shortly. If the error still occurs, contact support. * @summary Vulnerability service not available * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class VulnerabilityServiceUnavailableError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Vulnerability service not available', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2031', status: 503, description: `This issue is unexpected, and the service will recover shortly. If the error still occurs, contact support.`, errorCode: 'SNYK-OSSI-2031', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.VulnerabilityServiceUnavailableError = VulnerabilityServiceUnavailableError; /** * @class * @name VulnDBInvalidResponseError * @description An unexpected error occurred. Please try again, and if you continue to experience issues please contact support. * @summary This issue is unexpected and the service should recover quickly if not please contact support * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class VulnDBInvalidResponseError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'This issue is unexpected and the service should recover quickly if not please contact support', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2032', status: 500, description: `An unexpected error occurred. Please try again, and if you continue to experience issues please contact support.`, errorCode: 'SNYK-OSSI-2032', level: 'warn', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.VulnDBInvalidResponseError = VulnDBInvalidResponseError; /** * @class * @name VulndbNextError * @description An unexpected error occurred with the vulnerability service. Please try again, and if you continue to experience issues please contact support. * @summary This issue is unexpected and the service should recover quickly if not please contact support * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class VulndbNextError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'This issue is unexpected and the service should recover quickly if not please contact support', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2033', status: 500, description: `An unexpected error occurred with the vulnerability service. Please try again, and if you continue to experience issues please contact support.`, errorCode: 'SNYK-OSSI-2033', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.VulndbNextError = VulndbNextError; /** * @class * @name InternalServerError * @description This issue is unexpected, and the service will recover shortly. If the error still occurs, contact support. * @summary Request not processed due to unexpected error * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InternalServerError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Request not processed due to unexpected error', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2040', status: 500, description: `This issue is unexpected, and the service will recover shortly. If the error still occurs, contact support.`, errorCode: 'SNYK-OSSI-2040', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InternalServerError = InternalServerError; /** * @class * @name InvalidPaginationParametersError * @description The pagination limit is > 1 and ≤ 1000, and the offset is ≥0. * @summary Invalid pagination parameters * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InvalidPaginationParametersError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Invalid pagination parameters', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2041', status: 400, description: `The pagination limit is > 1 and ≤ 1000, and the offset is ≥0.`, errorCode: 'SNYK-OSSI-2041', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InvalidPaginationParametersError = InvalidPaginationParametersError; /** * @class * @name TooManyPurlsError * @description The number of purls sent in the request exceeds the limit of 1000 set by the service. * @summary purls exceed limit * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class TooManyPurlsError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'purls exceed limit', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2042', status: 400, description: `The number of purls sent in the request exceeds the limit of 1000 set by the service.`, errorCode: 'SNYK-OSSI-2042', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.TooManyPurlsError = TooManyPurlsError; /** * @class * @name TooManyIssuesError * @description The number of issues found for the provided purls exceeds the limit defined by the API. Reduce the number of purls sent in a single request. * @summary Number of issues exceeds limit * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class TooManyIssuesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Number of issues exceeds limit', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2043', status: 400, description: `The number of issues found for the provided purls exceeds the limit defined by the API. Reduce the number of purls sent in a single request.`, errorCode: 'SNYK-OSSI-2043', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.TooManyIssuesError = TooManyIssuesError; /** * @class * @name UndefinedContainerDistroError * @description The given Package URL does not have a required distro qualifier. * * See more: * - [https://docs.snyk.io/scan-containers/how-snyk-container-works/supported-operating-system-distributions#debian](https://docs.snyk.io/scan-containers/how-snyk-container-works/supported-operating-system-distributions#debian) * @summary Expected distro to be present * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UndefinedContainerDistroError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Expected distro to be present', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2044', status: 400, description: `The given Package URL does not have a required distro qualifier.`, errorCode: 'SNYK-OSSI-2044', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/scan-containers/how-snyk-container-works/supported-operating-system-distributions#debian', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UndefinedContainerDistroError = UndefinedContainerDistroError; /** * @class * @name UnsupportedDebianDistroError * @description This Debian distro is currently not supported. * @summary Unsupported Debian distro * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedDebianDistroError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported Debian distro', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2045', status: 400, description: `This Debian distro is currently not supported.`, errorCode: 'SNYK-OSSI-2045', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedDebianDistroError = UnsupportedDebianDistroError; /** * @class * @name UndefinedContainerVendorError * @description The given Package URL does not have a required namespace. * @summary Expected namespace to be present * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UndefinedContainerVendorError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Expected namespace to be present', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2046', status: 400, description: `The given Package URL does not have a required namespace.`, errorCode: 'SNYK-OSSI-2046', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UndefinedContainerVendorError = UndefinedContainerVendorError; /** * @class * @name UnsupportedContainerVendorError * @description The given Package URL does not contain a supported vendor. Please use one of the listed vendors and try again. * @summary Unsupported vendor * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedContainerVendorError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported vendor', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2047', status: 400, description: `The given Package URL does not contain a supported vendor. Please use one of the listed vendors and try again.`, errorCode: 'SNYK-OSSI-2047', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedContainerVendorError = UnsupportedContainerVendorError; /** * @class * @name UnsupportedAlpineDistroError * @description This Alpine distro is currently not supported. * @summary Unsupported Alpine distro * @category PurlVulnerabilityFetching * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedAlpineDistroError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported Alpine distro', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-ossi-2048', status: 400, description: `This Alpine distro is currently not supported.`, errorCode: 'SNYK-OSSI-2048', level: 'warn', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedAlpineDistroError = UnsupportedAlpineDistroError; //# sourceMappingURL=PurlVulnerabilityFetching-error-catalog.js.map