HTTPError function

Helps to generate HTTP error responses