http: Return meaningful error codes