changed to use bottle HTTPError