You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/17 09:46:23 UTC

[GitHub] [apisix] zlhgo opened a new issue #6131: request help: custom mismatching route response

zlhgo opened a new issue #6131:
URL: https://github.com/apache/apisix/issues/6131


   ### Issue description
   
   now:
   
   apisix/init.lua:388
   ```
   return core.response.exit(404,
                       {error_msg = "404 Route Not Found"})
   ```
   
   expect configable mismatching route response.
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.11.0
   - OS (cmd: `uname -a`): 
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zlhgo commented on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
zlhgo commented on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1017434178


   不好意思,英语不好。
   就是如果APP请求了一个不存在的路由,返回的数据可能解析不了会导致APP崩溃,但是APP已经发布了。


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1018074477


   > 就是如果APP请求了一个不存在的路由,返回的数据可能解析不了会导致APP崩溃,测试可能没有测试到,但是APP已经发布了。
   
   waht @spacewander means that you can set up a `/*` route to underwrite and match all requests that cannot be matched, and configure the `fault-injection` plugin on this route to  define your response.
   
   just try.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zlhgo commented on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
zlhgo commented on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1018425375


   谢谢,应该是没问题的。不过还是希望能考虑下是否支持自定义配置,因为这样会更简单一些。 :-)


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1017196551


   Look like it is already solved by a match-anything route `/*` plus fault-injection plugin?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zlhgo closed issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
zlhgo closed issue #6131:
URL: https://github.com/apache/apisix/issues/6131


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zlhgo edited a comment on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
zlhgo edited a comment on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1017434178


   不好意思,英语不好。
   就是如果APP请求了一个不存在的路由,返回的数据可能解析不了会导致APP崩溃,测试可能没有测试到,但是APP已经发布了。


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6131: request help: custom mismatching route response

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6131:
URL: https://github.com/apache/apisix/issues/6131#issuecomment-1014369124


   > incudes status code, header, body
   
   Could you provide more details for your use case?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org