Mike errors

Added custom error types for us to use in the backend

<!---
@huboard:{"order":3.75,"milestone_order":9,"custom_state":"ready"}
-->

as discussed, this is a technical restriction with typescript. Probably fixable, but I don't want to spend more time on this