bottle 0.12.8 changed exception handling, fixing rest error handling