Error Catalog

Snyk Error Codes

The error codes in the table below describe the codes that you may encounter while working with the Snyk API or CLI. When errors are encountered using the API, they will also have an appropriate HTTP status code. If you encounter errors without an error code, use the HTTP status code to determine the appropriate action.


Service temporarily throttled

The request rate limit has been exceeded. Wait a few minutes, then try again.

HTTP Status: 429

Server error response

The server doesn't recognize the request method, or it cannot fulfill it. Review the request and try again.

HTTP Status: 501

Help Links:

Client request cannot be processed

The server cannot process the request due to a client error, such as malformed request syntax, size too large, invalid request message framing, or deceptive request routing. Review the request and try again.

HTTP Status: 400

Server communication error

The server timed out during the request. Check Snyk status, then try again.

HTTP Status: 504

Help Links:

Authentication error

Authentication credentials not recognized, or user access is not provisioned. Revise credentials and try again, or request access from your Snyk administrator.

HTTP Status: 401

Test limit reached

You have reached the maximum number of tests in your Snyk plan. This causes Snyk tests on PRs and CLI to fail. Deactivate Snyk Test on your Project or upgrade your Snyk plan.

HTTP Status: 429

Help Links:

Request not fulfilled due to server error

The server cannot process the request due to an unexpected error. Check Snyk status, then try again.

HTTP Status: 500

Help Links:


Code

Analysis file count limit exceeded

This error occurs when the analysis target has a supported file count that exceeds current system limits.

To reduce the file count, use a .snyk file to ignore specified directories or files. Alternatively, use the Snyk CLI to analyze individual subdirectories separately.

HTTP Status: 422

Help Links:

Analysis result size limit exceeded

This error occurs when the analysis target generates a result with a byte size that exceeds current system limits.

To reduce the overall result size, use a .snyk file to ignore specified directories or files. Alternatively, use the Snyk CLI to analyze individual subdirectories separately.

HTTP Status: 422

Help Links:

Analysis target size limit exceeded

This error occurs when the analysis target byte size exceeds current system limits.

To reduce the overall result size, use a .snyk file to ignore specified directories or files. Alternatively, use the Snyk CLI to analyze individual subdirectories separately.

HTTP Status: 422

Help Links:

Analysis target includes a file with a name longer than 255 bytes

This error occurs when the analysis target has a file name length that exceeds 255 bytes.

To be able to scan the analysis target, rename the file to a name that is 255 bytes or less.

HTTP Status: 422

Help Links:


OpenAPI

Bad request

The server cannot process the request due to invalid or corrupt data. Review the request, then try again.

HTTP Status: 400

Help Links:

Forbidden

Access to the requested resource is forbidden. Review the request, then try again.

HTTP Status: 403

Not acceptable

The server cannot provide a response that matches the provided accept headers. Review the request, then try again.

HTTP Status: 406

Not found

The server cannot find the requested resource. Review the request, then try again.

HTTP Status: 404

Method not allowed

The target endpoint does not support your request method. Review the request, then try again.

HTTP Status: 405

Request entity too large

The request entity exceeds server limitations. Reduce the size of the request entity, then try again.

HTTP Status: 413

Unauthorized

The request lacks authentication credentials for the requested resource. Ensure you are sending valid credentials, then try again.

HTTP Status: 401

Help Links:

Unsupported media type

The media format of the request is not supported. Change media format, then try again.

HTTP Status: 415


Unable to parse manifest file

The provided manifest file could not be parsed as it has invalid syntax or does not match the expected schema. Review the manifest file, then try again.

HTTP Status: 400

Unable to parse lock file

The provided lock file could not be parsed as it has invalid syntax or does not match the expected schema. Review the lock file, then try again.

HTTP Status: 400

Unknown dependency version

Dependency version could not be resolved.

HTTP Status: 404

Help Links:

Missing required request header

The server encountered a request that is missing a mandatory request header.

HTTP Status: 422

Payload missing required elements

The server could not process the request.

HTTP Status: 422

Files cannot be processed

The dependency service could not process the files.

HTTP Status: 422

Cannot get file from source

Could not get the file from the source URL.

HTTP Status: 500

Missing environment variable

The server encountered a critical operation that requires a specific environment variable, but the variable is not set or is not accessible within the current environment.

HTTP Status: 500

Unsupported manifest file type for remediation

The provided manifest file is not supported by Snyk for .NET.

HTTP Status: 400

Help Links:

Target framework not supported

The provided manifest file defines a <TargetFramework> or <TargetFrameworks> that is not currently supported by Snyk's .NET scanning solution.

HTTP Status: 422

Your C# code is missing a static Main function

This error occurs when no static Main method with a correct signature is found in the code that produces an executable file. It also occurs if the entry point function, Main, is defined with the wrong case, such as lower-case main.

In order to fix this issue, ensure that your program has a .cs file that contains a main function, such as

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("hello world");
        }
    }
}

HTTP Status: 422

Help Links:

The dotnet CLI is unable to generate a self-contained binary

This error occurs when running dotnet publish --sc --framework <your-target-framework> fails to generate a self-contained binary. Snyk needs to run this command in order to adequately determine the dependency tree for your project. If this command fails, Snyk cannot continue.

Steps to determine why this happened:

  • Checkout a clean version of your project in a temporary folder

  • Run dotnet publish --sc --framework <your-target-framework> on your project, and confirm this step fails.

If this step is successful locally, it is possible that Snyk is running another version of the .NET SDK. To tell Snyk which version of the .NET SDK to use, consider using the global.json solution provided by Microsoft.

HTTP Status: 422

Help Links:

Missing MSBuild Condition Construct in project file

The dotnet tool was unable to locate the .targets, .csproj or .props file responsible for one or more MSBuild conditions in your project file.

The tool encountered an error like

/path/to/file/project.csproj(33,13): error MSB4100: Expected "$(SomeCondition)" to evaluate to a boolean instead of "", in condition "!$(SomeCondition)".

This means the condition definition is missing in the project file that is currently being restored and in any project linked to it from there.

Snyk can scan only the project files accessible in the current repository or the private dependencies available to Snyk.

For example, if your code has the following structure:

<Project>
  <PropertyGroup>
    <SomeCondition Condition="'$(SomeCondition)' == ''">false</SomeCondition>
  </PropertyGroup>
</Project>

And

<Project Sdk='Microsoft.NET.Sdk'>
  <Import Project='..\external-libraries\some-library\project.targets' />
  <PropertyGroup>
    <TargetFrameworks>net8.0</TargetFrameworks>
  </PropertyGroup>
  <ItemGroup Condition='!$(SomeCondition)'>
    <PackageReference Include='Newtonsoft.Json' Version='13.0.3' />
  </ItemGroup>
</Project>

And external-libraries is not a part of your repository currently being scanned, Snyk is not able to find it.

This error occurs when your code depends on external libraries that are added to or generated from your source code using external tools unknown to Snyk or as part of a build step in your build or a deployment pipeline.

HTTP Status: 422

Help Links:

No target frameworks found in manifest files

Snyk was unable to detect any <TargetFramework>s in the supplied manifest files.

If you are using Directory.Build.props files to determine the target framework, ensure that it is named as such. Due to performance considerations on the customer's SCM network, Snyk does not perform case-insensitive searches for .props files.

HTTP Status: 422

Help Links:

Failed to access private module

Snyk could not access the private modules within your go.mod files.

HTTP Status: 400

Help Links:

Go mod file not found

A go.mod file was not found in the current directory or any parent directory.

HTTP Status: 400

Help Links:

OAuth re-authorization required

Your code is cloned on an isolated environment using Git as it is required by Snyk to analyze its dependencies.

Your Organization has enabled or enforced SAML SSO after you authorized Snyk to access your code, and a re-authentication is therefore required.

The error you're seeing is usually reproducible by attempting to do a git clone of your repository with incorrectly configured credentials. Verify your authentication configuration with your Git cloud provider and try again.

HTTP Status: 422

Help Links:

Your project repository is missing required files

Generating the dependency graph requires Snyk to run go list go list -deps -json inside the project. If the operation fails, creating a full dependency graph cannot continue.

This error means that you need some cleanup, such as go mod tidy) or your project deployment process contains a code generation step such as protobuf or similar that is not currently supported by Snyk.

To verify if this is the case, clone your project in a clean environment, run go list go list -deps -json and verify whether the operation fails.

If Snyk cannot process your code successfully, insert the Snyk CLI as part of your deployment pipeline.

HTTP Status: 422

Help Links:

Your project repository has inconsistent vendoring information

Generating the dependency graph requires Snyk to run go list -deps -json inside the project. If the operation fails, creating a full dependency graph cannot continue.

This error means that there is inconsistency between your vendor/modules.txt file and your go.mod file. To remediate, you need to:

  • go mod vendor

  • go mod tidy

Next, commit those changes to your repo. Snyk does not manipulate with your code on our end by design, which is why this is not done automatically.

To verify if this is the case, clone your project in a clean environment, run go list go list -deps -json and verify whether the operation fails. Then try and run the above mentioned commands and see if your SCM system reports changes in files.

HTTP Status: 422

Help Links:

Unsupported external file generation

Snyk currently does not support external file generation in your project. This limitation is due to Snyk's lack of visibility into the third-party generator tools you may be using and the specific commands required to generate these files.

Snyk can only work with the files available in your repository and does not have insight into the generation process for external files.

HTTP Status: 422

Unable to access private dependencies

The Go tool encountered a DepsError while trying to download a private dependency. Private repositories that are not accessible to the public internet and are not available on the official Go proxy mirror are cloned with a version control system and built on demand. This requires the VCS to have the correct access rights to that repository.

Snyk supports private repositories that are hosted in the same Organization and on the same Project that is scanned for vulnerabilities. The authentication to the private repository is the same as the authentication used to integrate that repository with Snyk.

This error appears when the authorization credentials do not allow access to the requested private dependency.

HTTP Status: 422

Help Links:

Unable to fetch private dependencies

The Go tool encountered a permissions error while fetching one of the private dependencies. Ensure that the integration token you used to sign in to Snyk is properly configured so that Snyk can access the private dependencies.

The Snyk Go integration only supports private dependencies that are used inside the same Organization as the Project you are scanning.

This error appears when Snyk is unable to properly access the authorization credentials for the requested private dependency.

HTTP Status: 401

Toolchain not available

Could not download Go toolchain.

HTTP Status: 500

Missing property

The required property is missing from the pom object.

HTTP Status: 422

Unable to resolve value for property

The targeted property could not be resolved with a valid value.

HTTP Status: 422

Unable to resolve version for property

The targeted property could not be resolved with a valid version.

HTTP Status: 500

Cyclic property detected in POM file

There is circular dependency among properties in the Maven project's configuration file (POM), preventing proper resolution and causing an error.

HTTP Status: 422

Error parsing the XML file

There is an error parsing the XML file. This could be referring to either pom.xml or maven-metadata.xml.

HTTP Status: 422

Invalid coordinates provided

The coordinates provided for a project were invalid.

HTTP Status: 422

Skipping group

Skipping a specific groupId starting due to remapped coordinates.

HTTP Status: 422

Pom file not found

The pom file was not found in Maven repository.

HTTP Status: 422

Missing project from POM

A project element is missing from POM.

HTTP Status: 422

Cannot resolve the target POM from the input XML

Cannot resolve the targeted POM from the input XML.

HTTP Status: 422

Cannot resolve the target POM from the repository

Cannot resolve the targeted POM from the repository.

HTTP Status: 404

Cannot get the build file repository

Cannot get the build file repository.

HTTP Status: 404

Unable to create hosted git info

Cannot create source URL.

HTTP Status: 500

No released version for versions range

There was no version released for the specified versions range.

HTTP Status: 422

Source is not supported

The source used is not supported by fetcher. The supported sources are: github, bitbucket, gitlab.

HTTP Status: 422

Timeout when processing the dependency tree

There was an timeout when processing the dependency tree.

HTTP Status: 422