Throw exception when deleting and a build could not be found.

This doesnt seem like a nice way of doing this. Is there a way to throw a 404 exception?