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

HTML-ized Tahoe-LAFS WAPI errors are unwieldy #573

Closed
crwood opened this issue Oct 6, 2022 · 0 comments · Fixed by #592
Closed

HTML-ized Tahoe-LAFS WAPI errors are unwieldy #573

crwood opened this issue Oct 6, 2022 · 0 comments · Fixed by #592

Comments

@crwood
Copy link
Member

crwood commented Oct 6, 2022

By default, the Tahoe-LAFS web API wraps response bodies for HTTP 500 errors in HTML/CSS, making it more difficult for applications like Gridsync to parse and/or display such content to humans in text form. As it turns out, there's a way to disable this behavior and have such stack traces returned in plain text. From the Tahoe-LAFS WAPI docs:

Unusual exceptions may result in a 500 Internal Server Error as a catch-all, with a default response body containing a Nevow-generated HTML-ized representation of the Python exception stack trace that caused the problem. CLI programs which want to copy the response body to stderr should provide an “Accept: text/plain” header to their requests to get a plain text stack trace instead.

Gridsync's interactions with the Tahoe-LAFS web API should include this header where possible in order to facilitating the handling of such errors.

See also tahoe-lafs/magic-folder#679

crwood added a commit that referenced this issue Jan 24, 2023
Strip HTML from Tahoe-LAFS WAPI internal server error messages

Closes #573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant