dotnet / nuget-trends

Check out NuGet packages adoption and what's trending on NuGet.
https://nugettrends.com
MIT License
146 stars 25 forks source link

Handle invalid packages in URL #216

Open sentry-io[bot] opened 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: SPA-7A

Error: Http failure response for https://nugettrends.com/api/package/history/System.Diagnostics?months=3: 404 OK

Http failure response for https://nugettrends.com/api/package/history/System.Diagnostics?months=3: 404 OK

A blog post includes a link to nuget trends with an invalid package (System.Diagnostics). This creates an error. The site could just handle the 404 from the API and handle this with a message: "package XYZ doesn't exist".

Repro: https://nugettrends.com/packages?months=3&ids=Serilog&ids=NLog&ids=Microsoft.Extensions.Logging&ids=System.Diagnostics&ids=log4net