{"record":{"id":"939bb0775caf1248","repo":"prestodb/presto","slug":"request-to-s-failed-s-error-s","errorCode":null,"errorMessage":"Request to %s failed: %s [Error: %s]","messagePattern":"Request to (.+?) failed: (.+?) \\[Error: (.+?)\\]","errorType":"http","errorClass":"IOException","httpStatus":503,"severity":"error","filePath":"presto-client/src/main/java/com/facebook/presto/client/auth/external/HttpTokenPoller.java","lineNumber":145,"sourceCode":"        return new Request.Builder()\n                .url(url)\n                .addHeader(USER_AGENT, USER_AGENT_VALUE);\n    }\n\n    private TokenPollResult executePoll(Request request)\n            throws IOException\n    {\n        JsonResponse<TokenPollRepresentation> response = executeRequest(request);\n\n        if ((response.getStatusCode() == HTTP_OK) && response.hasValue()) {\n            return response.getValue().toResult();\n        }\n\n        Optional<String> responseBody = Optional.ofNullable(response.getResponseBody());\n        String message = format(\"Request to %s failed: %s [Error: %s]\", request.url(), response, responseBody.orElse(\"<Response Too Large>\"));\n\n        if (response.getStatusCode() == HTTP_UNAVAILABLE) {\n            throw new IOException(message);\n        }\n\n        return TokenPollResult.failed(message);\n    }\n\n    private JsonResponse<TokenPollRepresentation> executeRequest(Request request)\n            throws IOException\n    {\n        try {\n            return execute(TOKEN_POLL_CODEC, client.get(), request);\n        }\n        catch (UncheckedIOException e) {\n            throw e.getCause();\n        }\n    }\n\n    public static class TokenPollRepresentation\n    {","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-client/src/main/java/com/facebook/presto/client/auth/external/HttpTokenPoller.java#L127-L163","documentation":"executePoll builds this message when the external authentication token-poll endpoint did not return HTTP 200 with a valid token body — the OAuth2 device-flow server rejected or failed the poll (e.g. pending, denied, or server error).","triggerScenarios":"Thrown at presto-client/src/main/java/com/facebook/presto/client/auth/external/HttpTokenPoller.java:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the external authenticator service health and URL","Retry the CLI authentication flow to start a fresh poll","Verify the redirected token from the browser was pasted/issued correctly"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}