Approach to Error handling in the backend
Most likely it only makes sense to start discussing on this issue after #211 (closed) and #212 (closed) is implemented.
Currently we handle errors in a defensive way (by raising an error for example when a different requestor
was passed in than the user of the request or when the purpose
is different on a package than the one in a DTR).
By handling errors gracefully, we are at a lower risk of exposing information while at the same time giving us some flexibility since it may enable a user to continue with what they are doing instead of presenting them with an error in cases where this can be avoided. Since we would still be logging cases where we perform graceful error handling, along with monitoring and alarming in place we can still make sure that we notice potential bugs early and proactively, even without users reporting them explicitly.
But of course this approach also has it's disadvantages. Let's discuss the advantages and disadvantages of both error handling approach in our case and let's decide which approach to use going forward.