-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TT-9231] Modified response body with go plugin responses >= 400 #5141
Comments
Hi @PatrickTaibel , |
I (as a part of BYU) logged this same issue internally as well. |
Hi @jvisker , Thanks. |
Hi @PatrickTaibel @jvisker @karthikbhat03, I'm pleased to confirm that we've got a fix for this issue - it'll be available in Tyk 5.0.7 / Tyk 5.2.2 releases. Thanks for supporting Tyk! |
Branch/Environment/Version
Describe the bug
The change of #4922 causes Tyk to always send an error message to the client when an error within a go plugin occurs. In case the error is caused by a sent status code >= 400 by the plugin itself this is not desiderable as it will append the Tyk error message to an already existing response from the plugin.
Reproduction steps
Actual behavior
A Tyk plugin error gets appended to the response body. Example from our application:
{"error":"Internal server error"}{"error": "plugin function sent error response code: 500"}
The first JSON object is from our plugin. The second one is from Tyk and shouldn't be there as the response is not a valid JSON anymore.
Additional context
I will create a PR with a potential fix in a minute.
The text was updated successfully, but these errors were encountered: