Fix bug in new routing code.

A non-zero error code was being returned even for successful routing which caused bounce responses