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

Add endpoints.onErrorAdd #743

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PhilippKolmann
Copy link

Summary

Add endpoints[].onErrorAdd to add response body or parts of it as error, when the conditions fail for easier debugging.

Implements #742

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Add endpoints[].onErrorAdd to add response body or parts of it as error, when the conditions fail for easier debugging.

Implements TwiN#742
@TwiN
Copy link
Owner

TwiN commented Aug 27, 2024

I would be more okay with having the debug parameter print the body in the logs honestly.
The big problem is that it's pretty common for firewalls or outages to cause normally JSON or plain text endpoints to return HTML pages, and those HTML pages can be pretty lengthy, something that may cause issues both at the storage level and at the display level on the UI

@PhilippKolmann
Copy link
Author

My intention was, that I see immediately what my micro services are lacking because they write it in the body.

But I see your point.

@PhilippKolmann
Copy link
Author

Would you prefer to have a limit of text that could be added, and if the body is over the limit, then to truncate or not print it?

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 this pull request may close these issues.

3 participants