better http "error handling"