Post message IllegalStateException
See original GitHub issueI tried to post a message to a private channel (conversation) and set the text, but I get an illegal state exception:
ERROR com.hubspot.slack.client.interceptors.http.DefaultHttpResponseDebugger: REQ<7> [chat_postMessage]: Failed interaction
IllegalStateException: SlackError{type=UNKNOWN, error=invalid_arguments}
{
"ok" : false,
"error" : "invalid_arguments",
"deprecated_argument" : "as_user",
"warning" : "missing_charset",
"response_metadata" : {
"warnings" : [ "missing_charset" ]
}
}
Here is what I tried:
Result<ChatPostMessageResponse, SlackError> postResult = slackClient.postMessage(
ChatPostMessageParams.builder()
.setText("hey there")
.setChannelId(getChannelId(channelName))
.build()
).join();
I’ve also tried passing in the channelName as the slack api suggests and followed the examples in this library but still gave me the same error.
Could anyone please take a look?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Spring Boot exception while trying to send email:java.lang ...
The problem is that your Email class is a Spring-managed bean (due to it being annotated with @Component ). This means that Spring...
Read more >How to Fix The IllegalStateException in Java - Rollbar
An IllegalStateException is a runtime exception in Java that is thrown to indicate that a method has been invoked at the wrong time....
Read more >How to Solve java.lang.IllegalStateException in Java main ...
Generally, this method is used to indicate a method is called at an illegal or inappropriate time. Example: After starting a thread we...
Read more >E-WL: WebLogic Log Shows Message "BEA-101020 java.lang ...
The WebLogic log sometimes posts message "java.lang.IllegalStateException: Response already committed". Below is an example of the full ...
Read more >unable to send over websocket java.lang.IllegalStateException
SocketTimeoutException [2020-03-26T19:46:36,477] <ws-notify> WARN api - unable to send message [2020-03-26T19:46:36,479] <ws-notify> WARN api - unable to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m getting same error like the above error.
@szabowexler I just patched up the new release 1.7-SNAPSHOT, but unfortunately i still get this error 😦 not sure how to proceed. could you please take a look? It’s the same code as I wrote previously ^