Description
When a user calls the "/apisix/admin/plugins/reload" endpoint to reload the plugins, there is a chance that a wrong HTTP method was used instead of "PUT". In the current implementation, when this happens, for example the endpoint was called via GET method, APISIX will try to find any plugins called "reload", which produces the following response:
{
"error_msg": "failed to load plugin reload"
}
To improve the experience, we can consider returning a more user-friendly response when the "plugins/reload" is requested using a wrong method. For example, return this instead:
{
"error_msg": "please use PUT method to reload the plugins, GET method is not allowed."
}
NOTE: This change also makes "reload" a reserved plugin name (wondering if this concept exists in APISIX), because it can never be retrieved via "GET /plugins/".
Related PR: #9482