Create decorator for HTTP error propogation