Hi. This type of error:
means that the Salesforce API endpoint is refusing the connection outright even before a request with a proper authorization header (i.e., session ID or access token) can be processed.
I can think of several reasons why that might happen, but I can't really think of a good reason why it would start happening consistently until the IDE is restarted, then be resolved. Well, the one reason that does come to mind for that is that the endpoint URL is no longer valid -- and IC does cache those aggressively in memory because it's not expected that they'd change -- and by restarting the IDE, IC retrieves a new endpoint URL that's presumably correct.
We can certainly try to confirm that one way or the other. If you'd like to do so, please add the following to Help | Diagnostic Tools | Debug Log Settings:
com.illuminatedcloud.intellij.client.ForceComApiClient
That will log the header-level information for all Salesforce SOAP and REST API requests and responses. When this error starts to occur for you, restart the IDE and do something that uses the API and works, then send over the resulting idea.log file for review. You can send it via
email, and because that log will contain more information about API requests/responses, feel free to redact anything sensitive before sending it. What I'll specifically be looking for are the endpoint and authorization header being used for the API calls that are failing in this manner before the IDE restart and the same information for the API calls that are working after the IDE restart to see what's different.
Please let me know if that request doesn't make sense.
Regards,
Scott Wells