Return status codes along with error