racket / scribble

Other
197 stars 90 forks source link

Handle JS errors when the package is still not uploaded to server #316

Open sorawee opened 2 years ago

sorawee commented 2 years ago

When a package is still not uploaded to the package server, viewing the doc locally will attempt to query information from the package server, which of course will fail. However, it should not result in an unhandled error like:

GET https://pkgs.racket-lang.org/pkg/pprint-compact.json
[HTTP/3 404 Not Found 444ms]

and

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data