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
x/website: on go.dev/play, "server error, try again" displayed when server responds with 413 Payload Too Large #49527
Comments
The playground defines a max snippet size of 64 KB. The snippet above is about twice as large. The server returns status code 413, but the frontend displays the same "Server error; try again." for any non-200 status code. 64 KB may be a reasonable limit if this large size is worked around by not including the go.sum file—the go command will use the checksum database (sum.golang.org) instead. The frontend should certainly be updated to display a better message for 413. |
@uppalabharath Thanks for offering to help (be sure to look over https://go.dev/doc/contribute if you haven't already)! I think the message just needs to communicate the reason for the problem. Perhaps something like "Snippet is too large to share." |
@dmitshur Thanks for the suggestion. would use this message. |
@dmitshur it seems like the same fix is needed in |
@dmitshur I have made the changes and raised a Gerrit review. |
Change https://golang.org/cl/366095 mentions this issue: |
The playground has recently moved to go.dev/play, and so the fix needs to happen in x/website.
Oh, that was actually due to a bug in x/website. It has recently been fixed in CL 366376, and the |
@dmitshur sure Thanks.. Would make the change in the latest code. |
Change https://golang.org/cl/366714 mentions this issue: |
…413 while sharing snippet The current error message handling on go.dev/play UI always displays same message for all http status codes other than 200. Error handling mechanism on UI is updated to display "Snippet too large to share." when server responds with status code 413 while sharing a snippet. Fixes golang/go#49527 Change-Id: Id7d617b7f363bc579b4d7e4be21e8443c44243e6 Reviewed-on: https://go-review.googlesource.com/c/website/+/366714 Reviewed-by: Russ Cox <rsc@golang.org> Website-Publish: Russ Cox <rsc@golang.org> Trust: Ian Lance Taylor <iant@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org>
What did you do?
Navigate to https://play.golang.org.
Paste in the following Go program:
Share
button.What did you expect to see?
A URL from which the program can be run.
What did you see instead?
A browser dialog box, with the text “Server error; try again.”
There are three problems here:
a. There is no obvious reason why this should be an error at all. (The
go.sum
file is a bit large, but not outrageously huge.)b. The error message does not indicate the nature of the problem.
c. Trying again does not succeed, so the error message is actively wrong to suggest that I do that.
The text was updated successfully, but these errors were encountered: