jaikamat / clubhouse-pos-importer

Monorepo for an LGS's inventory management system
1 stars 0 forks source link

Toast UI errors #335

Closed jaikamat closed 3 years ago

jaikamat commented 3 years ago

Summary

We were inconsistent in bubbling errors up to the UI in a predictable way. Given the recent errorBoundary changes on the backend, I've chosen to bubble up errors to the UI for authenticated users, which should make debugging a much speedier process going forward.

In this PR we've extended ToastContext with a createErrorToast function that issues a toast with error severity and a stringified representation of the caught err object.