Basic error handling for invalid HTTP requests