-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(pdk) kong.response.get_source() to return error on plugin throws runtime exception #8599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, can we add a test case using severless-plugin
?
This change context should be by plugin, instead of all application initializer? In my opinion, if a error was received, the application should exit, instead of only log an error, should be dangerous only log an error... 🤔 |
In access phase we need to run through the whole plugin iterator to get list of plugins for the request. You cannot exit it while looping. We need to collect the plugins even in case of an error. |
…runtime exception
minor fixes Co-authored-by: Datong Sun <datong.sun@konghq.com>
3ffb487
to
e5757a2
Compare
Summary
If plugin that throws runtime exception on access phase,
kong.response.get_source()
should returnederror
instead ofexit
.FTI-3200