SP doesnt return error code

Database
Enthusiast

SP doesnt return error code

I have a stored procedure which fails due to duplicate error, however it doesnt return any error code to the bteq that calls the proc. Are there any error level settings that I'm missing? Pls help