error catch proto