Added: Error handling for HTTP status codes.