HTTP Error handling policy across Gutenberg #39254
Labels
[Package] API fetch
/packages/api-fetch
REST API Interaction
Related to REST API
[Type] Enhancement
A suggestion for improvement.
Right now, there is no standardized way of handling HTTP errors in Gutenberg.
Any request may fail for a number of reasons, and different errors require different handling. Sometimes, the error is up to a specific API consumer to handle, for example:
But there is also a class of global errors that could be consistently handled whenever they occur in random actions or resolvers, for example:
These are merely examples to illustrate the problem. There are many, many more scenarios and the list of HTTP response error codes would be a good place to start mapping out different cases so that we could discuss the most appropriate behaviors.
Related reads:
cc @youknowriad @jsnajdr @Mamaduka @dmsnell @gwwar @ntsekouras @jorgefilipecosta @ellatrix @gziolo @draganescu @scruffian @getdave @paaljoachim @spacedmonkey @TimothyBJacobs @talldan @noisysocks @kevin940726
The text was updated successfully, but these errors were encountered: