You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by ShanJia Dai <ni...@gmail.com> on 2022/01/10 09:24:55 UTC

key auth plugin customize reject error message

hi everyone,
i want to add customized error message for key-auth plugin.
here is my PR: Dev/key auth customize error msg by nimohunter · Pull
Request #6040 · apache/apisix (github.com)
<https://github.com/apache/apisix/pull/6040>

according from @spacewander, he think all the plugin's error msg should be
customized in one place. like plugin's disable.

according from @membphis , he think the key-auth plugin can only customized
the error message without error code.

What do you think?

---
by the way, i think key-auth is suitable for call between service. For
example, I have an API that I want to provide to colleagues in other
departments. This logic is really suitable for key-auth and consumers.

Re: key auth plugin customize reject error message

Posted by Zexuan Luo <sp...@apache.org>.
I have provided an idea to add rejected_code/msg fields commonly:
https://github.com/apache/apisix/pull/6040#pullrequestreview-846310321

ShanJia Dai <ni...@gmail.com> 于2022年1月10日周一 17:25写道:
>
> hi everyone,
> i want to add customized error message for key-auth plugin.
> here is my PR: Dev/key auth customize error msg by nimohunter · Pull
> Request #6040 · apache/apisix (github.com)
> <https://github.com/apache/apisix/pull/6040>
>
> according from @spacewander, he think all the plugin's error msg should be
> customized in one place. like plugin's disable.
>
> according from @membphis , he think the key-auth plugin can only customized
> the error message without error code.
>
> What do you think?
>
> ---
> by the way, i think key-auth is suitable for call between service. For
> example, I have an API that I want to provide to colleagues in other
> departments. This logic is really suitable for key-auth and consumers.