-
Notifications
You must be signed in to change notification settings - Fork 98
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
Extending business exceptions through the java spi mechanism #298
base: main
Are you sure you want to change the base?
Conversation
thanks cr |
Hi, I just added lisence,. |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
org.apache.apisix.plugin.runner.handler.GlobalException |
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.
org.apache.apisix.plugin.runner.handler.GlobalException | |
org.apache.apisix.plugin.runner.handler.GlobalException | |
you must add a blank line at the end
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.
thank. I have added a blank line at the end of this file
If we are based on plug-ins, there is no way to scale our business based on exceptions |
add a blank line at the end
This pr didn't import any new features, just refactoring, right? |
I think this PR provides the ability to extend exceptions through spi, and I think this is also the ability of this plugin to improve This code logic is not very difficult, maybe I describe the problem, you can look at the implementation of the code, in fact, can solve the business above the exception capture pain points |
@nic-chen please help to check |
Please answer these questions before submitting a pull request
Why submit this pull request?
Extending business exceptions through the java spi mechanism
Related issues
Bugfix
why is it so important / why do we need this / what problem it solves.
If we are based on plug-ins, there is no way to scale our business based on exceptions
The code is so old that it doesn't know how the response body should return,
For example:
We authenticate the user through the plug-in, if the user does not have permission, theory
The upper system should tell the user that there is no access permission. Normally we can do that in java
Throw an exception and wrap the response by catching the exception
New feature or improvement
Describe the details and related test reports.
Source branch
Related commits and pull requests
Target branch