rust-lang / rust-lang/rust-playground

Gists created without descriptions cannot be loaded

Open
#775 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
Rust
Stars
1.4k
Forks
267
Avg merge
3h 2m
Merged PRs (30d)
6

Description

Whenever i create a public gist using GitHub API, and try to open it on Rust playground using https://play.rust-lang.org/?gist=211bb09a91daf972934a13d6aee9e178; The editor isn't able to fetch contents of that gist. I looked into the console tab on inspect section on my browser, i saw a error of this kind.
image

on further inspection , i found out, the application fetches gist contents by sending GET request to https://play.rust-lang.org/meta/gist/211bb09a91daf972934a13d6aee9e178 and for all the gist created using API it is returning 500 server error.

Here is the curl request

curl -X  POST  \
-H "Authorization: token [my-token] " \
-H "Accept: application/vnd.github.v3+json" \
-d '{"public": true, "files": {"[filename]": {"filename": "my_public_file", "content": "pub fn main() { println!("test") }"}}}' 
https://api.github.com/gists \

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failing GET request at /meta/gist/211bb09a91daf972934a13d6aee9e178 with a public GitHub API gist that has no description. Trace the gist-loading entry point from that endpoint and compare it with a gist that has a description. Done means the Rust Playground editor loads the contents of both kinds of gist without a 500 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, rust
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.