Add check for HTTP status codes