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/05/17 07:50:49 UTC

[GitHub] [apisix] mygrsun commented on issue #7056: help request: is there any way to get the upstream error in the plugin?

mygrsun commented on issue #7056:
URL: https://github.com/apache/apisix/issues/7056#issuecomment-1128533427

   > you can use this plugin: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/response-rewrite.md
   > 
   > the config maybe:
   > 
   > ```json
   > {
   >                     "plugins": {
   >                         "response-rewrite": {
   >                             "body": "{\"code\":\"ok\",\"message\":\"new json body\"}",
   >                             "status_code": 502,
   >                             "vars": [
   >                                 ["status","==",502]
   >                             ]
   >                         }
   >                     },
   >                     "upstream": {
   >                         "nodes": {
   >                             "127.0.0.1:1980": 1
   >                         },
   >                         "type": "roundrobin"
   >                     },
   >                     "uri": "/hello"
   >                 }
   > ```
   > 
   > just an example, please read the plugin document.
   
   thank you


-- 
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