Convert/catch `panic` and `errors`, turning them into proper errors
As part of my work on #267 (closed), what has been left out at the moment was auditing the codebase for all those occurrences of panic
and error
which would reflect in a poor/no error on the frontend side.
We should audit these occurrences and at the very least have a top-level exception handler to turn them into a proper error, but even better we should convert those into a BackendInternalError
so that they have a proper translation into a FrontendError
.