fixed http errors

closes#113 changed http errors to throw exception in the 500 catch
thingy