🐛 Authorization error should not cause a page to crash entirely #6158
Replies: 3 comments 4 replies
-
Overall, I 100% agree that if we can return a meaningful amount of information to the user without crashing, that would better. However, it does make error handling much more difficult. I can imagine scenarios where we would need to know if something is actually missing or if it's there but can't be delivered. I guess we'll need to figure out if we can get the API to respond with both an It seems like Lighthouse might be able to do this? https://lighthouse-php.com/6/digging-deeper/error-handling.html#partial-errors |
Beta Was this translation helpful? Give feedback.
-
I'm pretty sure the API already does this if an authorization error is caused by a directive nested deeper in the query. |
Beta Was this translation helpful? Give feedback.
-
Seems like we're in favour of letting errors surface issues early, rather than trying to work around them silently. And this kind of error was a lot more niche than I realized anyway. I'm closing this discussion. |
Beta Was this translation helpful? Give feedback.
-
We are making queries on the admin side which include a message about unauthorization errors, but most of the data is actually present! For example, in #6149, a pool field deep in the query was null, but we had most of the data we needed. And thanks to Typescript, we're checking for nulls everywhere we need to! It would be nicer to show a toast error, but also render as much of the page as possible.
Beta Was this translation helpful? Give feedback.
All reactions