Skip to content

Updated error message when vault script access is not provided. #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

VShingala
Copy link
Member

@VShingala VShingala commented Jun 23, 2025

Overview

This PR improves the error message provided when vault access is not provided from Postman App while script execution happens.

We're adding extra line to give more meaningful message to help fix the issue.

Error shown after change in App.

image

@@ -411,7 +411,8 @@ module.exports = {
const dispatch = (e, r) => { this.host.dispatch(EXECUTION_VAULT_BASE + executionId, id, e, r); };

if (!hasVaultAccess) {
return dispatch('Vault access denied');
return dispatch('Vault access denied.' +
' To allow script access, go to Vault settings and turn on "Enable support in scripts"');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VShingala I understand the motivation, but the updated error message has nothing to do with postman-runtime and is leaking details of the system outside of its domain.

I'd recommend throwing an error with a specific code and then handling it based on the code where ever requied.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@appurva21 Hmm, That makes sense. Let me figure out if we can do this from parent system where we can override it.

@VShingala
Copy link
Member Author

Closing this PR for now since it's out of context for this module.

@VShingala VShingala closed this Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants