Also, I don't think you need this error; you're already limiting things on the URL side.  This is unused/untestable code