Raise an exception instead of a 500 so it can be detected