You need to raise an exception here instead of just returning a string error.