Troubleshoot SDK errors in Postman
The SDK commands in the Postman CLI can emit errors and warnings based on their current implementations under lib/commands/sdk/* and related services.
The following sections are organized by command and cross-functional concerns:
postman sdk generatepostman sdk listpostman sdk get,postman sdk fetch, andpostman sdk downloadpostman sdk connect- Shared build, artifact, filesystem, configuration, language, and HTTP-status handling.
All SDK subcommands share the same authentication mechanism. When no API key or access token is available, they surface a common no authorization data error.
Common authentication and authorization errors
These apply to all SDK subcommands that wrap postmanUtil.addApiKeyToOptions or withAuthentication and to some helper flows (identifyIdType, validateCollection, workspace lookups, and the SDK generator API).
Missing CLI authentication
The source of this message is:
ERROR_MESSAGES.NO_AUTHORIZATION_DATA_WITH_REFERENCE(used insdk/generate.ts,sdk/list.ts,sdk/get.ts,sdk/authenticated-action.ts)- Ad-hoc message in
sdk/connect.tsworkspace lookup and specification/collection helpers.
If the error message is:
or (when surfaced through the shared error message constant):
It occurs in the following cases:
-
When running any of the following without a valid Postman API key or access token:
postman sdk generate <id>postman sdk list <collectionId>postman sdk get|fetch|download <buildId>postman sdk connect github <id>(initial auth check)
-
When calling helpers that require auth:
identifyIdType/validateCollection- Workspace discovery in
sdk/connect.ts createSDKGeneratorServicewhen bothaccessTokenandpostmanApiKeyare missing:
The expected response is:
- The command exits with status code
1after logging the error tostderr.
To resolve this error, do the following:
- Run
postman loginto create or refresh the local access token. - Or provide
POSTMAN_API_KEY/--api-keyas documented in the CLI auth docs. - Ensure the same account has access to the collections/specifications you are working with.
Generate command errors and warnings
Collection validation errors
If the error message is:
It occurs in the following cases:
- When the collection doesn’t exist.
- When the user doesn’t have access to the collection.
To resolve this error, do the following:
- Verify the collection ID is correct.
- Check that you have access to the collection.
- Ensure you’re authenticated with the correct account.
If the error message is:
It occurs in the following cases:
- When collection validation fails for any reason.
To resolve this error, do the following:
- Verify the collection ID.
- Check your access permissions.
- Ensure you’re authenticated.
Collection identifier errors
If the error message is:
It occurs in the following cases:
- When the ID is null, undefined, or not a string.
If the error message is:
It occurs in the following cases:
- When the ID is a URL (starts with
http://orhttps://).
If the error message is:
It occurs in the following cases:
- When the ID looks like a file path (for example ends with
.json,.yaml,.yml, or contains/or\).
If the error message is:
It occurs in the following cases:
- When the ID format is invalid.
- When it doesn’t match a supported UUID format.
To resolve this error, do the following:
- Use a valid Postman Collection ID or specification ID in UUID format. Supported formats include:
- Standard UUID (8-4-4-4-12), typically used for specifications.
- Prefixed UUID (8-8-4-4-4-12), typically used for collections.
Language selection errors
If the error message is:
It occurs in the following cases:
- When both
--alland--languageflags are used together.
To resolve this error, do the following:
- Use either
--allto generate all languages, or--languageto specify specific languages.
If the error message is:
It occurs in the following cases:
- When the user cancels the language selection prompt.
- When no languages are selected from the interactive prompt.
To resolve this error, do the following:
- Re-run the command and select at least one language.
- Or use
--languageflag to specify languages directly.
If the error message is:
It occurs in the following cases:
- When an unsupported language is specified.
To resolve this error, do the following:
- Use one of the supported languages:
typescript,python,java
If the error message is:
It occurs in the following cases:
- When no valid languages are provided after filtering.
Configuration file errors
If the error message is:
It occurs in the following cases:
- When the specified config file doesn’t exist.
If the error message is:
It occurs in the following cases:
- When fetching a config file from a URL fails.
If the error message is:
It occurs in the following cases:
- When reading a local config file fails.
If the error message is:
It occurs in the following cases:
- When the config file contains invalid JSON.
If the error message is:
It occurs in the following cases:
- When the config file doesn’t match the expected schema.
To resolve this error, do the following:
- Check the config file format against the schema.
- Ensure all required fields are present.
- Validate JSON syntax.
SDK generation API errors
If the error message is:
It occurs in the following cases:
- When the API rate limit is exceeded (HTTP 429).
To resolve this error, do the following:
- Wait until the rate limit resets.
- Reduce the frequency of requests.
If the error message is:
It occurs in the following cases:
- When the user doesn’t have permission to generate SDKs (HTTP 403).
To resolve this error, do the following:
- Check your account permissions.
- Contact your administrator if needed.
If the error message is:
It occurs in the following cases:
- When polling for build status fails.
- When build polling times out.
To resolve this error, do the following:
- Check your network connection.
- Try again later.
- Check build status manually.
If the error message is:
It occurs in the following cases:
- When the SDK generator service fails to initialize.
To resolve this error, do the following:
- Check your authentication.
- Verify network connectivity.
- Try again.
PR creation errors
If the error message (specification ID with --pr) is:
It occurs in the following cases:
- When
postman sdk generate <specificationId> --pris used (PRs are only supported for collection IDs, not specification IDs).
This warning message (generic PR failure) appears:
It occurs in the following cases:
- When PR creation fails (non-fatal, doesn’t stop SDK generation).
This is a warning, not an error. SDK generation continues even if PR creation fails.
List command errors
Status validation errors
If the error message is:
It occurs in the following cases:
- When an invalid status filter is provided.
To resolve this error, do the following:
- Use one of:
in-progress,success,failure(case-insensitive)
API errors
If the error message is:
It occurs in the following cases:
- When rate limit is exceeded (HTTP 429).
If the error message is:
It occurs in the following cases:
- When no builds exist for the collection (HTTP 404).
To resolve this error, do the following:
- Generate a build first using
postman sdk generate.
If the error message is:
It occurs in the following cases:
- When a server error occurs (HTTP 500+).
If the error message is:
It occurs in the following cases:
- When verbose mode is enabled and an error occurs.
- Shows the HTTP status code for debugging.
Download errors
If the error message is:
It occurs in the following cases:
- When fetching full build details fails during download.
If the error message is:
It occurs in the following cases:
- When downloading SDKs from a build fails.
Get/Fetch command errors
Build ID validation errors
If the error message is:
It occurs in the following cases:
- When the build ID isn’t a valid positive number.
To resolve this error, do the following:
- Provide a valid numeric build ID.
Build not found errors
If the error message is:
It occurs in the following cases:
- When the build ID doesn’t exist (HTTP 404).
To resolve this error, do the following:
- Verify the build ID is correct.
- List builds first to see available build IDs.
If the error message is:
It occurs in the following cases:
- When the build has no successful SDK artifacts.
To resolve this error, do the following:
- Check if the build completed successfully.
- Try a different build ID.
If the error message is:
It occurs in the following cases:
- When requesting a specific language that doesn’t exist in the build.
To resolve this error, do the following:
- Use one of the available languages.
- Or omit the
--languageflag to download all available SDKs.
If the error message is:
It occurs in the following cases:
- When no SDK artifacts are found in the build.
Download errors
If the error message is:
It occurs in the following cases:
- When an artifact has no URL and the collection ID is missing.
If the error message is:
It occurs in the following cases:
- When downloading a specific SDK language fails.
If the error message is:
It occurs in the following cases:
- When rate limit is exceeded (HTTP 429).
If the error message is:
It occurs in the following cases:
- When SDK service initialization fails.
Connect command errors
Provider validation errors
If the error message is:
It occurs in the following cases:
- When an unsupported provider is specified.
To resolve this error, do the following:
- Use
githubas the provider.
Language validation errors
If the error message is:
It occurs in the following cases:
- When language isn’t provided.
To resolve this error, do the following:
- Use
--languageor-lflag to specify a language.
If the error message is:
It occurs in the following cases:
- When an unsupported language is specified.
To resolve this error, do the following:
- Use one of the supported languages.
Workspace errors
If the error message is:
It occurs in the following cases:
- When the user has no accessible workspaces.
If the error message is:
It occurs in the following cases:
- When the collection can’t be found in any workspace.
To resolve this error, do the following:
- Provide the workspace ID manually using
--workspaceoption.
OAuth authentication errors
If the error message is:
It occurs in the following cases:
- When OAuth authentication takes too long (5 minutes timeout).
To resolve this error, do the following:
- Try the authentication process again.
- Complete the browser authentication promptly.
If the error message is:
It occurs in the following cases:
- When OAuth token is missing after authentication.
To resolve this error, do the following:
- Re-run the connect command.
- Complete the OAuth flow again.
Repository errors
If the error message is:
It occurs in the following cases:
- When the selected owner/organization has no repositories.
To resolve this error, do the following:
- Select a different owner/organization.
- Ensure the owner has accessible repositories.
If the error message is:
It occurs in the following cases:
- When the repository has no branches.
To resolve this error, do the following:
- Ensure the repository has at least one branch.
- Check repository access permissions.
Integration errors
If the error message is:
It occurs in the following cases:
- When an integration is missing required configuration.
This warning message appears:
It occurs in the following cases:
- When GitHub user info can’t be fetched (non-fatal).
This warning message appears:
It occurs in the following cases:
- When deleting an existing integration fails (non-fatal).
If the error message is:
It occurs in the following cases:
- When no SDK files are found to copy to the repository.
To resolve this error, do the following:
- Ensure SDKs were generated successfully.
- Check the output directory contains SDK files.
If the error message is:
It occurs in the following cases:
- When creating a PR for a specific integration fails.
If the error message is:
It occurs in the following cases:
- When one or more PRs fail to be created.
Build completion errors
Build status errors
If the error message is:
It occurs in the following cases:
- When a build fails completely.
- Shows failed artifacts and their errors.
This warning message appears:
It occurs in the following cases:
- When a build completes with some successful and some failed artifacts.
If the error message is:
It occurs in the following cases:
- When build completion handling fails.
Download errors
If the error message is:
It occurs in the following cases:
- When user declines to overwrite existing SDK directories.
To resolve this error, do the following:
- Use
--yesflag to automatically overwrite. - Or manually remove existing directories.
If the error message is:
It occurs in the following cases:
- When downloading a specific language SDK fails.
Resource validation errors
Collection validation errors
If the error message is:
It occurs in the following cases:
- When collection ID is missing.
If the error message is:
It occurs in the following cases:
- When collection doesn’t exist or user lacks access.
Configuration errors
Config file errors
If the error message is:
It occurs in the following cases:
- When the specified config file doesn’t exist.
If the error message is:
It occurs in the following cases:
- When fetching config from URL fails.
If the error message is:
It occurs in the following cases:
- When reading a local config file fails.
If the error message is:
It occurs in the following cases:
- When config file contains invalid JSON.
If the error message is:
It occurs in the following cases:
- When config file doesn’t match the expected schema.
Language validation errors
Language format errors
If the error message is:
It occurs in the following cases:
- When unsupported languages are specified.
To resolve this error, do the following:
- Use supported languages:
typescript,python,java
If the error message is:
It occurs in the following cases:
- When no valid languages are provided.
If the error message is:
It occurs in the following cases:
- When language can’t be extracted from artifact bucket key.
File system errors
Download errors
If the error message is:
It occurs in the following cases:
- When downloading an artifact fails.
If the error message is:
It occurs in the following cases:
- When artifact download returns an error status code.
If the error message is:
It occurs in the following cases:
- When writing downloaded file to disk fails.
To resolve this error, do the following:
- Check disk space.
- Verify write permissions.
- Check file path validity.
Artifact errors
If the error message is:
It occurs in the following cases:
- When artifact is missing required metadata.
If the error message is:
It occurs in the following cases:
- When required parameters are missing to fetch download URL.
If the error message is:
It occurs in the following cases:
- When artifact has no download URL.
HTTP status code errors
Rate limit (429)
If the error message is:
It occurs in the following cases:
- When API rate limit is exceeded.
To resolve this error, do the following:
- Wait until the rate limit resets.
- Reduce request frequency.
Forbidden (403)
If the error message is:
It occurs in the following cases:
- When user lacks permission for the operation.
To resolve this error, do the following:
- Check account permissions.
- Contact administrator.
Not found (404)
If the error message is:
It occurs in the following cases:
- When resource doesn’t exist.
To resolve this error, do the following:
- Verify the ID is correct.
- Check if resource was deleted.
Server error (500+)
If the error message is:
It occurs in the following cases:
- When server encounters an error.
To resolve this error, do the following:
- Retry the operation.
- Check Postman status page.
- Contact support if issue persists.
General error format
Most errors follow this format:
Some errors include additional context:
Warnings (non-fatal) use this format:
Notes for technical writers
Actual messages vs. published text
The messages above are exactly what the CLI prints today (or their dynamic templates). Public docs can:
- Keep these verbatim in “CLI output” code blocks.
- Use friendlier, more concise explanations in prose around them.
Linking
For each category, consider cross-linking to:
- Authentication docs (
postman login, API key configuration). - SDK generator conceptual overview (what “builds”, “artifacts”, and “integrations” are).
- GitHub integration docs for
postman sdk connectand--prflows.
Keep this file current
When SDK command code changes:
- Search
lib/commands/sdkandlib/api/sdk-generator-service.tsfor:new Error(,colors.red(/colors.yellow(/print.lf(with hard-coded strings,ERROR_MESSAGESusages,throw new Error(...)in helpers.
- Update this document to include any new or changed messages and conditions.
- Ensure newly added languages, providers, or integration types are reflected in the supported values and error descriptions above.