Generally, it's better to raise a relevant exception, rather than returning a status code like this.