spacewander commented on issue #8091: URL: https://github.com/apache/apisix/issues/8091#issuecomment-1886951254
> > > > Will the `error_response` in https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/plugin.md#plugin-common-configuration solve the problem? > > > > > > > > > I think this is not user friendly,This approach is more like a helpless move. 🙃 > > > > > > @smileby Why do you think this approach is "helpless"? > > Fields in the plugin configuration cannot be used to configure return messages. You need to use the general functions of the plug-in. May be difficult for users to understand simply because of a hard-coded problem I could not understand this quite well. Could you provide an example for it? Do you mean generating the response on the fly instead of using a configured string? As for hardcode, the configuration with error response: ``` { "x": { "_meta": { "error_response": { "message": "Missing credential in request" } }, "reject_msg": "Missing credential in request" } } ``` is not quite different from the configuration field `reject_msg`. They are both hardcoded strings. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
