sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
809 stars 36 forks source link

add error handling of github api errors #46

Closed nosovk closed 11 months ago

nosovk commented 1 year ago

Time to time GitHub API can go down, and make responses with 5xx codes and body like that:

{
   "data": null,
   "errors":[
      {
         "message":"Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `DF4A:6E1B:1D670F9:1DAA64D:64E7DC75` when reporting this issue."
      }
   ]
}

It would be nice to show some error modal with "Retry" button to retry the request. No errors silently ignored :(

kyoshino commented 1 year ago

Netlify CMS has a background service status check and shows an alert when the Git backend is down.

https://github.com/decaporg/decap-cms/pull/3889

I think we need this and took a screenshot before:

Screenshot 2023-02-17 at 11 42 58 PM

The English label is

The backend service is experiencing an outage. See %{details} for more information