Skip to content
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

refactor(pdk): show more friendly error msg when passing invalid arguments #13224

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

ADD-SP
Copy link
Contributor

@ADD-SP ADD-SP commented Jun 18, 2024

Summary

The function assert doesn't show the caller of the PDK function when failed to validate incoming arguments. Invoking function error when unable to validate an argument can get a better error message.

Checklist

  • The Pull Request has tests
  • [N/A] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • [N/A] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

KAG-4679

@github-actions github-actions bot added core/pdk cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jun 18, 2024
@ADD-SP ADD-SP changed the title fix(pdk): function store_response_header should accept nil as arg#3 fix(pdk): function store_response_header should accept nil for value Jun 18, 2024
@ADD-SP ADD-SP force-pushed the add_sp/fix-rl-pdk branch from f77ad1e to 2c50a62 Compare June 18, 2024 06:07
@ADD-SP ADD-SP changed the title fix(pdk): function store_response_header should accept nil for value refactor(pdk): more friendly error msg on arguments checking Jun 18, 2024
@ADD-SP ADD-SP changed the title refactor(pdk): more friendly error msg on arguments checking refactor(pdk): show more friendly error msg when passing invalid arguments Jun 18, 2024
@ADD-SP ADD-SP marked this pull request as ready for review June 18, 2024 06:25
@ADD-SP ADD-SP merged commit 65201e8 into master Jun 19, 2024
33 checks passed
@ADD-SP ADD-SP deleted the add_sp/fix-rl-pdk branch June 19, 2024 00:58
@ADD-SP ADD-SP added incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention and removed cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jun 19, 2024
@ADD-SP
Copy link
Contributor Author

ADD-SP commented Jun 19, 2024

Manually cherry-picked to https://github.com/Kong/kong-ee/pull/9478.

@ADD-SP ADD-SP removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants