Skip to content

Trying to create REPL share links with large amounts of code fails. #174

@jlengstorf

Description

@jlengstorf

In the REPL, trying to create a share link with a large code sample will fail. This happens because Google's URL shortener won't accept URLs over a certain length and returns a 400 error.

The shortener seems to start throwing errors at 4,096 characters.

A possible solution would be an error handler for 400 errors from Google that checks the URL length and offers a helpful error message:

Cannot create a share link for URLs over 4,096 characters in length. Please reduce the size of your sample code to share.

Alternatively, an event handler on the function that changes the URL could do a quick check for length and disable the share button with a title message explaining that the current code snippet is too long to be shared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions