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

feat: As a user, I want to let api-breaker plugin return default response body #6923

Closed
qihaiyan opened this issue Apr 25, 2022 · 5 comments · Fixed by #6949
Closed

feat: As a user, I want to let api-breaker plugin return default response body #6923

qihaiyan opened this issue Apr 25, 2022 · 5 comments · Fixed by #6949
Assignees
Labels
good first issue Good for newcomers

Comments

@qihaiyan
Copy link
Contributor

Description

refer to the document api-breaker
when upstream is in the unhealthy state, the api-breaker returns unhealthy.http_statuses only, without a response body.
In order to be more compatible to the client, return a default response body is useful.

@tokers
Copy link
Contributor

tokers commented Apr 25, 2022

Sound good, which value do you think is reasonable for the default response body?

@qihaiyan
Copy link
Contributor Author

Sound good, which value do you think is reasonable for the default response body?

Different api may return different default value. Users should specify the default value with admin api, and the plugin api could add a new param like unhealthy.http_response_body

@tokers
Copy link
Contributor

tokers commented Apr 26, 2022

Sound good, which value do you think is reasonable for the default response body?

Different api may return different default value. Users should specify the default value with admin api, and the plugin api could add a new param like unhealthy.http_response_body

I think a field like break_response_body can be added.

@spacewander spacewander added the good first issue Good for newcomers label Apr 26, 2022
@qihaiyan
Copy link
Contributor Author

Sound good, which value do you think is reasonable for the default response body?

Different api may return different default value. Users should specify the default value with admin api, and the plugin api could add a new param like unhealthy.http_response_body

I think a field like break_response_body can be added.

I could make a pr for this, if you don't mind. @tokers

@tokers
Copy link
Contributor

tokers commented Apr 26, 2022

Sound good, which value do you think is reasonable for the default response body?

Different api may return different default value. Users should specify the default value with admin api, and the plugin api could add a new param like unhealthy.http_response_body

I think a field like break_response_body can be added.

I could make a pr for this, if you don't mind. @tokers

Sure, assigned to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants