Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: plugin api-breaker set response headers occur 500 Internal Error #7234

Closed
he953481025-debug opened this issue Jun 11, 2022 · 0 comments · Fixed by #7238
Closed

bug: plugin api-breaker set response headers occur 500 Internal Error #7234

he953481025-debug opened this issue Jun 11, 2022 · 0 comments · Fixed by #7238

Comments

@he953481025-debug
Copy link

Current Behavior

Use api-breaker to set circuit breaker

Expected Behavior

When the upstream service is not available, return my desired json

Error Logs

image
image

Steps to Reproduce

1.configure api-breaker of plugin
{ "break_response_code": 200, "max_breaker_sec": 300, "unhealthy": { "http_statuses": [ 500, 502, 503 ], "failures": 3 }, "healthy": { "http_statuses": [ 200 ], "successes": 3 }, "break_response_body": "{\"code\":\"0\",\"msg\":\"new json body\"}", "break_response_headers": [{"content-type":"application/json"}] }
2.When I remove break_response_headers, the plugin works fine

Environment

  • Kubernetes version: v1.18.15
  • APISIX version : apache/apisix:2.14.1-alpine
  • Ingress Controller: apache/apisix-ingress-controller:1.4.1
  • etcd version: docker.io/bitnami/etcd:3.4.14-debian-10-r0
  • APISIX Dashboard version: 2.11.0
@he953481025-debug he953481025-debug changed the title bug: plugin api-breaker set response body occur 500 Internal Error bug: plugin api-breaker set response headers occur 500 Internal Error Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant