How to stop 500 errors when UUID doesn't match

I have heard not to use raise in my project, because it is a time bomb.