magery
magery copied to clipboard
Error handling and reporting
My philosophy so far has been to avoid runtime errors based on the shape of the context data wherever possible. Otherwise, it's very easy to take out large portions of a website when the context data is updated.
However, I think errors we can detect during compile time should be reported. In the JavaScript library, some of these might be best reported as warnings (or even console.errors for developers), to avoid breaking user interaction wherever possible. The server-side implementations should, however, produce exceptions in their normal way.
I'm opening this ticket in part to document my thoughts, but also to invite comment. If you think this is the wrong approach, let's discuss it here.
Having used angular this seams very familliar to me. The error/warning message will be very helpfull in my opinion (if the data doesn't match the expected format)
I think we should be consistent as much as possible between client side and server side. In my opinion the same reason for simple warning message applies to server side too