codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
12.97k stars 2.26k forks source link

When the API returns 404 Sandbox not found, the page shows a Loading skeleton forever. #8351

Open ADTC opened 5 months ago

ADTC commented 5 months ago

🐛 bug report

Preflight Checklist

Description of the problem

Console shows 404 on the following API URL:

https://codesandbox.io/api/v1/sandboxes/lexical-plain-text-example-g932e

When the API returns the following response with an HTTP 404 status,

{
    "error": "Sandbox not found"
}

the Codesandbox website gets stuck showing "Loading" screen forever.

image

How has this issue affected you? What are you trying to accomplish?

Trying to view Lexical example. Apparently the sandbox is deleted or something, but Codesandbox just shows a Loading skeleton forever, which is confusing at first glance.

It should show "This sandbox doesn't exist." or a similar message. Additional elements like a link to the home page, a "Create a new sandbox" button or a list of suggested sandboxes are up to you.

To Reproduce

Try this publicly linked Lexical Plain Text Sandbox from the Lexical docs page here. Or try the link to any sandbox that was removed.

Link to sandbox: link (optional)

Your Environment

Software Name/Version
Сodesandbox ? (Web version)
Browser Chrome 121.0.6167.184 (Official Build) (arm64) / Edge 121.0.2277.128 (Official build) (arm64)
Operating System macOS Sonoma 14.2.1 (23C71)
JamesACS commented 5 months ago

Hello @ADTC ,

It seems that this environment has indeed been deleted, but I agree that the fact that there isn't an error is confusing and misleading. I'll raise this as a bug on our end