foundation for rich error messages