Does anyone have a good overview on what errors the Prismic.client from @prismicio/client can return in different scenarios such as network outage, server side issues, document issues? I would like to write an error handler to cover those for the different scenarios.
With @prismicio/client@5 (or 4), errors throw are generic errors, and the message can help you to write error handlers.
With @prismicio/client@6 (beta), here are the error classes have thrown by the package: prismic-client/index.ts at v6 · prismicio/prismic-client · GitHub, you can use them to identify more precisely what happened.
The link points to various Error classes that are returned in the response. I havn't made use of them, but am looking solely at the status parameter of the response.