This is strange. try the following
create procedure test1 as return null
declare @rc int = 991
--> you get
The 'test1' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
So I rather would test for failure (provided 0 stands for success) with something like
if isnull(@rc,991) <> 0 --> failure