Add custom error support