[pyramid] Fix 404 handling
Avoid seeing a traceback in the UI by catching it before it reaches pyramid and
restore usage of the '404' view.
Closes #16159863
rql('SET X name "BoundaryConstraint" ''WHERE X is CWConstraintType, X name "BoundConstraint"')